aboutsummaryrefslogtreecommitdiff
path: root/playlist-get
diff options
context:
space:
mode:
Diffstat (limited to 'playlist-get')
-rwxr-xr-xplaylist-get13
1 files changed, 9 insertions, 4 deletions
diff --git a/playlist-get b/playlist-get
index 5f69e8a..a6d5b02 100755
--- a/playlist-get
+++ b/playlist-get
@@ -48,7 +48,7 @@ elif [ "$BASENAME" == "playlist-copy" ]; then
DEST="`cd $DEST && pwd`"
elif [ "$DEST" == "adb" ]; then
APP="adb"
- action="adb"
+ action="push"
DEST="/storage/emulated/0/Music"
else
DEST="--to $DEST"
@@ -69,11 +69,16 @@ cat $PLAYLISTS/$PLAYLIST.m3u | while read file; do
$APP $action "$file" "$DEST$prefix"
elif [ "$action" == "get" ]; then
$APP $action "$file"
- elif [ "$action" == "adb" ]; then
+ elif [ "$APP" == "adb" ]; then
prefix="/$(dirname "$file")"
- $APP shell mkdir -p "$DEST$prefix" &> /dev/null
- $APP push "$file" "$DEST$prefix"
+ $APP shell mkdir -p "$DEST$prefix" &> /dev/null
+ $APP $action "$file" "$DEST$prefix"
else
$APP $action "$file" $DEST
fi
done
+
+# Copy the playlist to the destination
+if [ "$action" != "get" ]; then
+ $APP $action "$PLAYLISTS/$PLAYLIST.m3u" $DEST/$PLAYLIST.m3u
+fi