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