update gogoanime link to fix query

This commit is contained in:
ksyasuda 2021-11-29 13:08:41 -08:00
parent cc9f7e7a44
commit 3b762fc4e4

14
ani-cli
View File

@ -7,7 +7,7 @@ fi
VERBOSE=0 VERBOSE=0
BASE_URL="https://gogoanime.cm" BASE_URL="https://www1.gogoanime.cm/"
CFG_DIR="$XDG_CONFIG_HOME/aniwrapper" CFG_DIR="$XDG_CONFIG_HOME/aniwrapper"
ROFI_CFG="meh.rasi" ROFI_CFG="meh.rasi"
@ -546,7 +546,7 @@ shift $((OPTIND - 1))
######## ########
case $scrape in case $scrape in
query) query)
get_search_query "$*" get_search_query "$*"
search_results=$(search_anime "$query") search_results=$(search_anime "$query")
[ -z "$search_results" ] && die "No search results found" [ -z "$search_results" ] && die "No search results found"
@ -555,7 +555,7 @@ case $scrape in
fi fi
episode_selection episode_selection
;; ;;
history) history)
stmt="SELECT DISTINCT anime_name FROM watch_history ORDER BY watch_date DESC" stmt="SELECT DISTINCT anime_name FROM watch_history ORDER BY watch_date DESC"
search_results=$(printf "%s\n" "$stmt" | sqlite3 -noheader "$HISTORY_DB") search_results=$(printf "%s\n" "$stmt" | sqlite3 -noheader "$HISTORY_DB")
[ -z "$search_results" ] && die "History is empty" [ -z "$search_results" ] && die "History is empty"
@ -572,8 +572,8 @@ case $scrape in
ep_choice_start=$(run_stmt "$stmt") ep_choice_start=$(run_stmt "$stmt")
log "Most recently watched episode: $ep_choice_start" log "Most recently watched episode: $ep_choice_start"
;; ;;
playlist) playlist)
lines=$(wc -l < "$playlist_file" ) lines=$(wc -l <"$playlist_file")
log "Num lines in playlist: " "$lines" log "Num lines in playlist: " "$lines"
if [[ "$lines" -eq 0 ]]; then if [[ "$lines" -eq 0 ]]; then
get_search_query "$*" get_search_query "$*"
@ -599,7 +599,7 @@ case $scrape in
[ "$VERBOSE" -eq 1 ] && printf "Episodes: %s\n" "${episodes[@]}" [ "$VERBOSE" -eq 1 ] && printf "Episodes: %s\n" "${episodes[@]}"
fi fi
;; ;;
add) add)
get_search_query "$*" get_search_query "$*"
search_results=$(search_anime "$query") search_results=$(search_anime "$query")
[ -z "$search_results" ] && die "No search results found" [ -z "$search_results" ] && die "No search results found"
@ -607,7 +607,7 @@ case $scrape in
[ $? -ne 0 ] && die "No anime selection found" [ $? -ne 0 ] && die "No anime selection found"
episode_selection episode_selection
;; ;;
sync) sync)
printf "%s" "Enter username for remote user: " printf "%s" "Enter username for remote user: "
read -r username read -r username
printf "%s" "Enter host for remote user: " printf "%s" "Enter host for remote user: "