fix parsing of autoplay and silent mode flags

This commit is contained in:
ksyasuda 2022-06-12 19:00:03 -07:00
parent af7dee7d85
commit ec41f5abb3

View File

@ -290,7 +290,7 @@ check_flags() {
if ((IS_RESUME)); then if ((IS_RESUME)); then
args+=(-r) args+=(-r)
fi fi
if ((IS_SILENT)); then if ((SILENT)); then
args+=(-S) args+=(-S)
fi fi
if ((IS_CUSTOM_THEME)); then if ((IS_CUSTOM_THEME)); then
@ -303,7 +303,7 @@ check_flags() {
fi fi
lg "ARGS: ${args[*]}" lg "ARGS: ${args[*]}"
if ((IS_DOWNLOAD || !IS_ROFI || IS_RESUME || IS_PLAY_FROM_FILE)); then if ((IS_AUTOPLAY || IS_DOWNLOAD || !IS_ROFI || IS_RESUME || IS_PLAY_FROM_FILE)); then
run "${args[@]}" "$@" run "${args[@]}" "$@"
exit $? exit $?
fi fi
@ -337,6 +337,7 @@ main() {
case "$selection" in case "$selection" in
1.) 1.)
lg "Streaming mode" lg "Streaming mode"
echo "ARGS: ${args[*]}"
run "${args[@]}" run "${args[@]}"
;; ;;
2.) 2.)