ptgdp: Switch to mpd/mpc

This commit is contained in:
Salt 2019-08-13 03:35:50 -05:00
parent 873ddaad12
commit e5bf4e6f50

9
ptgdp
View File

@ -78,9 +78,9 @@ clearcache() {
helptext() { helptext() {
cat << EOF cat << EOF
Usage: $_name [OPTION] Usage: $_name [OPTION]
Use youtube-dl and audacious to queue up a playlist given a file of only search Use youtube-dl and mpc to queue up a playlist given a file of only search
queries. The first result found is the one that will be downloaded. Downloaded queries. The first result found is the one that will be downloaded. Downloaded
files are cached in your Music folder under "JPTGDP Songs" for offline use. files are cached in your Music folder under "PTGDP Songs" for offline use.
-f <file> The playlist file to load. The file should be plaintext -f <file> The playlist file to load. The file should be plaintext
containing a YouTube search query on each line. containing a YouTube search query on each line.
Comments are supported and prepended with # Comments are supported and prepended with #
@ -182,9 +182,10 @@ playlist() {
else else
dlexist+=1 dlexist+=1
fi fi
[ -z "$_optdownloadonly" ] && audacious -e "$filename" validatedeps mpc || continue
[ -z "$_optdownloadonly" ] && mpc add "$filename"
if [ -n "$_optautoplay" ]; then if [ -n "$_optautoplay" ]; then
audacious -p mpc play
unset _optautoplay unset _optautoplay
fi fi
else else