mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
Compare commits
3 Commits
d7bd5899b5
...
7a3a61bb58
Author | SHA1 | Date | |
---|---|---|---|
|
7a3a61bb58 | ||
|
f95ae51af8 | ||
|
8fb570b003 |
14
ani-cli
14
ani-cli
@ -245,9 +245,7 @@ update_date() {
|
|||||||
insert_history() {
|
insert_history() {
|
||||||
datetime=$(date +'%Y-%m-%d %H:%M:%S')
|
datetime=$(date +'%Y-%m-%d %H:%M:%S')
|
||||||
lg "Checking if ($*) exists in db"
|
lg "Checking if ($*) exists in db"
|
||||||
check_db "$@"
|
if ! check_db "$@"; then
|
||||||
res="$?"
|
|
||||||
if [[ $res -gt 0 ]]; then
|
|
||||||
lg "Match found... Updating row in history db..."
|
lg "Match found... Updating row in history db..."
|
||||||
update_date "$@"
|
update_date "$@"
|
||||||
res=$?
|
res=$?
|
||||||
@ -408,13 +406,9 @@ find_media() {
|
|||||||
case "$selection" in
|
case "$selection" in
|
||||||
Back | ../)
|
Back | ../)
|
||||||
dotdotslash="${inp%/*}"
|
dotdotslash="${inp%/*}"
|
||||||
if [ -z "$dotdotslash" ]; then
|
[ -z "$dotdotslash" ] && dotdotslash="/"
|
||||||
insert_history "directory" "/"
|
|
||||||
find_media "/"
|
|
||||||
else
|
|
||||||
insert_history "directory" "$dotdotslash"
|
insert_history "directory" "$dotdotslash"
|
||||||
find_media "$dotdotslash"
|
find_media "$dotdotslash"
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
Quit)
|
Quit)
|
||||||
return 1
|
return 1
|
||||||
@ -545,7 +539,7 @@ anime_selection() {
|
|||||||
done <<< "$search_results"
|
done <<< "$search_results"
|
||||||
|
|
||||||
[[ -z "$selection_id" ]] && die "Invalid number entered"
|
[[ -z "$selection_id" ]] && die "Invalid number entered"
|
||||||
insert_history "search" "$selection_id"
|
insert_history "search" "$selection_id" &
|
||||||
lg "Selection: $selection_id"
|
lg "Selection: $selection_id"
|
||||||
search_eps "$anime_id"
|
search_eps "$anime_id"
|
||||||
return 0
|
return 0
|
||||||
@ -694,7 +688,7 @@ stream() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
selection_id="$anime_id"
|
selection_id="$anime_id"
|
||||||
insert_history "search" "$anime_id"
|
insert_history "search" "$anime_id" &
|
||||||
search_eps "$anime_id"
|
search_eps "$anime_id"
|
||||||
fi
|
fi
|
||||||
episode_selection
|
episode_selection
|
||||||
|
Loading…
Reference in New Issue
Block a user