]> gitweb.fluxo.info Git - playlister.git/commitdiff
Download playlist only for playlist-wget
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 5 Oct 2017 10:37:51 +0000 (07:37 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 5 Oct 2017 10:37:51 +0000 (07:37 -0300)
playlist-wget

index 0f33887865755543520a99fdcf2a1fd9f5808f80..247d450c5ec3b49916eac010dde315eff410901e 100755 (executable)
@@ -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"`"