aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplaylist-wget8
1 files 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"`"