revert change for now so new episodes can be picked up

This commit is contained in:
ksyasuda 2022-02-20 17:47:16 -08:00
parent 924b0eed76
commit d7bd5899b5

View File

@ -475,10 +475,6 @@ search_anime() {
search_eps() {
anime_id=$1
if ! check_db "anime" "$anime_id"; then
FIRST_EP_NUMBER="$(run_stmt "SELECT start_episode FROM anime WHERE anime_name = '$anime_id';")"
LAST_EP_NUMBER="$(run_stmt "SELECT end_episode FROM anime WHERE anime_name = '$anime_id';")"
else
result=$(get_dpage_link "$anime_id" 0)
FIRST_EP_NUMBER="${result:-1}"
LAST_EP_NUMBER=$(curl -s "$BASE_URL/category/$anime_id" |
@ -488,9 +484,8 @@ search_eps() {
q
}
')
lg "Anime $anime_id not in anime database... inserting into database" > /dev/stderr
insert_history "anime" "$anime_id" "$FIRST_EP_NUMBER" "$LAST_EP_NUMBER"
fi
# lg "Anime $anime_id not in anime database... inserting into database" > /dev/stderr
# insert_history "anime" "$anime_id" "$FIRST_EP_NUMBER" "$LAST_EP_NUMBER"
FIRST_EP_NUMBER="${FIRST_EP_NUMBER%% }"
LAST_EP_NUMBER="${LAST_EP_NUMBER%% }"
lg "FIRST EP NUMBER: $FIRST_EP_NUMBER"