diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-10-23 13:14:44 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-10-23 13:14:44 -0200 |
commit | 2f4149230f14dbee63656c58528c0585e9c1d6a9 (patch) | |
tree | 299deea7da71f7844c1157017eb7a5df0883ce25 | |
parent | 3ea049abb2126e463a1b06bab96155ebbb5af3e3 (diff) | |
download | playlister-2f4149230f14dbee63656c58528c0585e9c1d6a9.tar.gz playlister-2f4149230f14dbee63656c58528c0585e9c1d6a9.tar.bz2 |
Examples and adb support
-rwxr-xr-x | playlist-get | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/playlist-get b/playlist-get index 170f6be..6c4dd51 100755 --- a/playlist-get +++ b/playlist-get @@ -21,6 +21,12 @@ if [ -z "$PLAYLIST" ]; then ls $PLAYLISTS fi + echo "Examples:" + echo "" + echo "$BASENAME ambient adb" + echo "$BASENAME groove /media/usb" + echo "$BASENAME funk remote-repository" + exit 1 elif [ ! -f "$PLAYLISTS/$PLAYLIST.m3u" ]; then echo "No such playlist $PLAYLISTS/$PLAYLIST.m3u" @@ -40,6 +46,10 @@ elif [ "$BASENAME" == "playlist-copy" ]; then # Force absolute path DEST="`cd $DEST && pwd`" + elif [ "$DEST" == "adb" ]; then + APP="adb" + action="adb" + DEST="/storage/emulated/0/Music" else DEST="--to $DEST" action="copy" @@ -59,6 +69,9 @@ cat $PLAYLISTS/$PLAYLIST.m3u | while read file; do $APP $action "$file" "$DEST$prefix" elif [ "$action" == "get" ]; then $APP $action "$file" + elif [ "$action" == "adb" ]; then + prefix="/$(dirname "$file")" + $APP push "$file" "$DEST$prefix" else $APP $action "$file" $DEST fi |