mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
make insert statements blocking to avoid locks
This commit is contained in:
parent
f40d5d2f91
commit
8902875806
6
ani-cli
6
ani-cli
@ -387,8 +387,10 @@ find_media() {
|
|||||||
dotdotslash="${inp%/*}"
|
dotdotslash="${inp%/*}"
|
||||||
if [ -z "$dotdotslash" ]; then
|
if [ -z "$dotdotslash" ]; then
|
||||||
find_media "/"
|
find_media "/"
|
||||||
|
insert_history "directory" "/"
|
||||||
else
|
else
|
||||||
find_media "$dotdotslash"
|
find_media "$dotdotslash"
|
||||||
|
insert_history "directory" "$dotdotslash"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
Quit)
|
Quit)
|
||||||
@ -398,7 +400,7 @@ find_media() {
|
|||||||
if [ ! -d "$inp/$selection" ] && [ ! -f "$inp/$selection" ]; then
|
if [ ! -d "$inp/$selection" ] && [ ! -f "$inp/$selection" ]; then
|
||||||
return 1
|
return 1
|
||||||
else
|
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
|
||||||
@ -901,7 +903,7 @@ main() {
|
|||||||
file)
|
file)
|
||||||
lg "STARTING DIR: $play_dir"
|
lg "STARTING DIR: $play_dir"
|
||||||
[ ! -d "$play_dir" ] && die "$play_dir does not exist"
|
[ ! -d "$play_dir" ] && die "$play_dir does not exist"
|
||||||
insert_history "directory" "$play_dir" &
|
insert_history "directory" "$play_dir"
|
||||||
video_path=$(find_media "$play_dir")
|
video_path=$(find_media "$play_dir")
|
||||||
retcode="$?"
|
retcode="$?"
|
||||||
if [ "$retcode" -ne 0 ]; then
|
if [ "$retcode" -ne 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user