Added support for appending playlists, also tweaked mopidy

This commit is contained in:
2017-07-31 02:03:03 -05:00
parent 50cd84c765
commit 578171f1bf
3 changed files with 12 additions and 4 deletions

View File

@@ -1,9 +1,15 @@
#!/bin/bash
PLAYLIST="$(mpc lsplaylists | rofi -lines 10 -dmenu -p 'Play MPD Playlist: ')"
MESSAGE='-mesg Append:'
if [ "$1" = "--clear" ]; then
MESSAGE='-mesg Replace:'
fi
PLAYLIST="$(mpc lsplaylists | rofi -lines 10 -dmenu -p 'Play MPD Playlist: ' $MESSAGE)"
if [ "$PLAYLIST" = "" ]; then
exit
fi
mpc clear
if [ "$1" = "--clear" ]; then
mpc clear
fi
mpc load $PLAYLIST
mpc play
notify-send -u low -t 5 -a 'Mopidy' "$PLAYLIST" "Beginning playback of playlist $PLAYLIST"