mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
fix theme not being passed properly in all cases
This commit is contained in:
parent
7ad12b0da8
commit
7d574f7a6f
24
aniwrapper
24
aniwrapper
@ -89,7 +89,12 @@ run() {
|
|||||||
if ((!IS_PLAY_FROM_FILE && !IS_SYNC && GET_QUALITY)); then
|
if ((!IS_PLAY_FROM_FILE && !IS_SYNC && GET_QUALITY)); then
|
||||||
get_quality
|
get_quality
|
||||||
fi
|
fi
|
||||||
$CMD -D"$DPI" "$@"
|
if ((IS_CUSTOM_THEME)); then
|
||||||
|
args+=(-T"$CFG_FILE")
|
||||||
|
elif ((!IS_CUSTOM_THEME)); then
|
||||||
|
args+=(-t"$theme")
|
||||||
|
fi
|
||||||
|
$CMD "${args[@]}" -D"$DPI" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_quality() {
|
get_quality() {
|
||||||
@ -293,11 +298,6 @@ check_flags() {
|
|||||||
if ((SILENT)); then
|
if ((SILENT)); then
|
||||||
args+=(-S)
|
args+=(-S)
|
||||||
fi
|
fi
|
||||||
if ((IS_CUSTOM_THEME)); then
|
|
||||||
args+=(-T"$CFG_FILE")
|
|
||||||
elif ((!IS_CUSTOM_THEME)); then
|
|
||||||
args+=(-t"$theme")
|
|
||||||
fi
|
|
||||||
if ((IS_VERBOSE)); then
|
if ((IS_VERBOSE)); then
|
||||||
args+=(-v)
|
args+=(-v)
|
||||||
fi
|
fi
|
||||||
@ -337,19 +337,19 @@ main() {
|
|||||||
case "$selection" in
|
case "$selection" in
|
||||||
1.)
|
1.)
|
||||||
lg "Streaming mode"
|
lg "Streaming mode"
|
||||||
run "${args[@]}"
|
run
|
||||||
;;
|
;;
|
||||||
2.)
|
2.)
|
||||||
lg "Download anime"
|
lg "Download anime"
|
||||||
get_dl_dir && run "${args[@]}" -d "$dl_dir"
|
get_dl_dir && run -d "$dl_dir"
|
||||||
;;
|
;;
|
||||||
3.)
|
3.)
|
||||||
lg "Continue watching"
|
lg "Continue watching"
|
||||||
run -H "${args[@]}"
|
run -H
|
||||||
;;
|
;;
|
||||||
4.)
|
4.)
|
||||||
lg "Showing recently updated anime"
|
lg "Showing recently updated anime"
|
||||||
run -R "${args[@]}"
|
run -R
|
||||||
;;
|
;;
|
||||||
5.)
|
5.)
|
||||||
lg "Play from file selected"
|
lg "Play from file selected"
|
||||||
@ -367,9 +367,9 @@ main() {
|
|||||||
lg "Play dir: $play_dir"
|
lg "Play dir: $play_dir"
|
||||||
if [ -z "$play_dir" ]; then
|
if [ -z "$play_dir" ]; then
|
||||||
mkdir -p "$DEFAULT_DOWNLOAD" || die "error creating default download directory"
|
mkdir -p "$DEFAULT_DOWNLOAD" || die "error creating default download directory"
|
||||||
run -f"$DEFAULT_DOWNLOAD" "${args[@]}"
|
run -f"$DEFAULT_DOWNLOAD"
|
||||||
else
|
else
|
||||||
run -f"$play_dir" "${args[@]}"
|
run -f"$play_dir"
|
||||||
fi
|
fi
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user