mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
add error checking to playlist mode
This commit is contained in:
parent
fd83a8c4a4
commit
6a1bfe1183
@ -60,6 +60,7 @@ elif [[ "$selection" == "4." ]]; then
|
|||||||
choice=$(printf "%s\n" "${options[@]}" |
|
choice=$(printf "%s\n" "${options[@]}" |
|
||||||
rofi -dmenu -sep '|' \
|
rofi -dmenu -sep '|' \
|
||||||
-config "$CFG_DIR/$CFG_FILE" -l 4 -i -p "Enter choice:")
|
-config "$CFG_DIR/$CFG_FILE" -l 4 -i -p "Enter choice:")
|
||||||
|
[ -z "$choice" ] && seppuku "No choice selected"
|
||||||
[ "$choice" == "5. Quit" ] && quit
|
[ "$choice" == "5. Quit" ] && quit
|
||||||
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
||||||
if [[ "$selection" == "1." ]]; then
|
if [[ "$selection" == "1." ]]; then
|
||||||
@ -70,6 +71,7 @@ elif [[ "$selection" == "4." ]]; then
|
|||||||
choice=$(printf "%s\n" "${options[@]}" |
|
choice=$(printf "%s\n" "${options[@]}" |
|
||||||
rofi -dmenu -sep '|' \
|
rofi -dmenu -sep '|' \
|
||||||
-config "$CFG_DIR/$CFG_FILE" -l 4 -i -p "Enter choice:")
|
-config "$CFG_DIR/$CFG_FILE" -l 4 -i -p "Enter choice:")
|
||||||
|
[ -z "$choice" ] && seppuku "No choice selected"
|
||||||
[ "$choice" == "5. Quit" ] && quit
|
[ "$choice" == "5. Quit" ] && quit
|
||||||
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
||||||
if [[ "$selection" == "1." ]]; then
|
if [[ "$selection" == "1." ]]; then
|
||||||
@ -81,6 +83,7 @@ elif [[ "$selection" == "4." ]]; then
|
|||||||
choice=$(find "$PLAYLIST_DIR" -type d |
|
choice=$(find "$PLAYLIST_DIR" -type d |
|
||||||
rofi -dmenu \
|
rofi -dmenu \
|
||||||
-config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Choose playlist:")
|
-config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Choose playlist:")
|
||||||
|
[ -z "$choice" ] && seppuku "No choice selected"
|
||||||
[ -z "$choice" ] &&
|
[ -z "$choice" ] &&
|
||||||
run -P "$PLAYLIST_DIR/$choice"
|
run -P "$PLAYLIST_DIR/$choice"
|
||||||
elif [[ "$selection" == "2." ]]; then
|
elif [[ "$selection" == "2." ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user