From a2ee5a327f96cfbd91ca48c360a2b81a7e0bf282 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 5 Oct 2017 07:37:51 -0300 Subject: Download playlist only for playlist-wget --- playlist-wget | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playlist-wget b/playlist-wget index 0f33887..247d450 100755 --- a/playlist-wget +++ b/playlist-wget @@ -24,11 +24,11 @@ PLAYLIST_BASE="$(dirname $(dirname $PLAYLIST))" # We use sed to replace new lines by the null character so xargs can detect each file correctly #curl -s $PLAYLIST | sed -e "s|^|\"$PLAYLIST_BASE/|" -e 's|$|"|' -e 's|\n|\x0|' | xargs wget -c -# Download the playlist -wget -c $PLAYLIST - -# Process each file +# Dispatch if [ "$BASENAME" == "playlist-wget" ]; then + # Download the playlist + wget -c $PLAYLIST + cat `basename $PLAYLIST` | while read file; do dirname="`dirname "$file"`" -- cgit v1.2.3