ptgdp: Simplify help text, remove arbitrary conflicts of flags

This commit is contained in:
Salt 2019-09-06 02:56:00 -05:00
parent 4e5de57f02
commit 8a06b9178b

14
ptgdp
View File

@ -184,7 +184,7 @@ execplaylists() {
for list in "${_playlists[@]}"; do
playlist "$list" || error "Failed to play playlist: \"$list\""
done
if [ -n "$_optautoplay" ]; then
if [ -n "$_optautoplay" ] && [ -z "$_optdryrun" ]; then
mpc play > /dev/null 2>&1
log "Started playback"
unset _optautoplay
@ -246,14 +246,10 @@ given plaintext FILEs with only search queries.
-c Clears the cache (which can become quite large)
-d Download only; don't queue anything up
Conflicts with -p
-D Dry run; parse out all songs, downloaded or not, and
print out the resolved names. Useful for testing, as
YouTube searches can sometimes be finicky.
-p Play the playlist after it is enqueued.
Conflicts with -d
-s Shuffle the playlist
print out the resolved names
-p Play the playlist after it is enqueued
-s Shuffle the playlist before enqueueing
-r <directory> Start up rofi, if installed, and present a listing of
all .gdp files in the given directory. If notify-send
is installed, this will also send notifications
@ -261,7 +257,6 @@ given plaintext FILEs with only search queries.
-R <directory|file> As above, but also parse out the selected playlist and
present a listing of individual songs. The argument can
be a file in this mode
-h Print this help text
Environment Variables
@ -455,7 +450,6 @@ main() {
done
[ -z "$_optdownloadonly" ] && [ -z "$_optdryrun" ] && ! validatedeps mpc && error "$_return is required outside of dry- and download-only runs"
[ -n "$_playlists" ] && [ -n "$_optrofi" ] && error "Flag -r cannot be used with playlist arguments" 2
[ -n "$_optdownloadonly" ] && [ -n "$_optautoplay" ] && error "Flags -d and -p conflict" 2
if [ -n "$_optrofi" ]; then rofimenu; exit $?; fi
if [ -n "$_playlists" ]; then
execplaylists