mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
fix some corner cases with play from file
This commit is contained in:
parent
e01040e15c
commit
3cec4558d2
12
ani-cli
12
ani-cli
@ -381,31 +381,31 @@ find_media() {
|
|||||||
selection="$(rofi -dpi "$DPI" -dmenu -only-match -async-pre-read 33 -config "$ROFI_CFG" \
|
selection="$(rofi -dpi "$DPI" -dmenu -only-match -async-pre-read 33 -config "$ROFI_CFG" \
|
||||||
-l 15 -i -sep '|' -mesg "$(generate_span "Current directory: $inp")" -a "$watched" \
|
-l 15 -i -sep '|' -mesg "$(generate_span "Current directory: $inp")" -a "$watched" \
|
||||||
-p "Enter selection" <<< "$inputlist")"
|
-p "Enter selection" <<< "$inputlist")"
|
||||||
|
lg "SELECTION: $selection" 1> /dev/stderr
|
||||||
case "$selection" in
|
case "$selection" in
|
||||||
Back | ../)
|
Back | ../)
|
||||||
dotdotslash="${inp%/*}"
|
dotdotslash="${inp%/*}"
|
||||||
if [ -z "$dotdotslash" ]; then
|
if [ -z "$dotdotslash" ]; then
|
||||||
find_media "/"
|
|
||||||
insert_history "directory" "/"
|
insert_history "directory" "/"
|
||||||
|
find_media "/"
|
||||||
else
|
else
|
||||||
find_media "$dotdotslash"
|
|
||||||
insert_history "directory" "$dotdotslash"
|
insert_history "directory" "$dotdotslash"
|
||||||
|
find_media "$dotdotslash"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
Quit)
|
Quit)
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ ! -d "$inp/$selection" ] && [ ! -f "$inp/$selection" ]; then
|
if [ -d "$inp/$selection" ]; then
|
||||||
return 1
|
|
||||||
else
|
|
||||||
insert_history "directory" "$inp/$selection"
|
insert_history "directory" "$inp/$selection"
|
||||||
if [ "$inp" = "/" ]; then
|
if [ "$inp" = "/" ]; then
|
||||||
find_media "/$selection"
|
find_media "/$selection"
|
||||||
else
|
else
|
||||||
find_media "$inp/$selection"
|
find_media "$inp/$selection"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
find_media "$inp/$selection"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user