mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
change continue to use search history so sorting works as intended
This commit is contained in:
parent
024bb138f0
commit
9f80566b6e
8
ani-cli
8
ani-cli
@ -805,11 +805,11 @@ main() {
|
|||||||
;;
|
;;
|
||||||
history)
|
history)
|
||||||
BASE_URL="$(curl -s -L -o /dev/null -w "%{url_effective}\n" https://gogoanime.cm)"
|
BASE_URL="$(curl -s -L -o /dev/null -w "%{url_effective}\n" https://gogoanime.cm)"
|
||||||
stmt="SELECT DISTINCT anime_name FROM watch_history ORDER BY watch_date DESC"
|
stmt="SELECT DISTINCT anime_name FROM search_history ORDER BY search_date DESC"
|
||||||
search_results="$(printf "%s\n" "$stmt" | sqlite3 -noheader "$HISTORY_DB")"
|
search_results="$(run_stmt "$stmt")"
|
||||||
[ -z "$search_results" ] && die "History is empty"
|
[ -z "$search_results" ] && die "History is empty"
|
||||||
if ! anime_selection "${search_results[@]}"; then
|
if ! anime_selection "${search_results[@]}"; then
|
||||||
die "No anime selection found"
|
die "No anime selected"
|
||||||
fi
|
fi
|
||||||
lg "SELECTION: $selection_id"
|
lg "SELECTION: $selection_id"
|
||||||
|
|
||||||
@ -939,7 +939,7 @@ main() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \
|
choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \
|
||||||
-theme-str 'listview {columns: 1;} window {width: 20%;}' \
|
-theme-str 'listview {columns: 1;} window {width: 25%;}' \
|
||||||
-i -l 6 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \
|
-i -l 6 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \
|
||||||
-p "Choose quality:" <<< "$qualities")
|
-p "Choose quality:" <<< "$qualities")
|
||||||
quality=$(awk '{ print $2 }' <<< "$choice")
|
quality=$(awk '{ print $2 }' <<< "$choice")
|
||||||
|
@ -114,7 +114,7 @@ get_quality() {
|
|||||||
if ((IS_ROFI == 1)); then
|
if ((IS_ROFI == 1)); then
|
||||||
selection=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
|
selection=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
|
||||||
-l 6 -selected-row 0 -a 0 \
|
-l 6 -selected-row 0 -a 0 \
|
||||||
-theme-str 'listview {columns: 1;} window {width: 20%;}' \
|
-theme-str 'listview {columns: 1;} window {width: 25%;}' \
|
||||||
-p "Choose video quality:" \
|
-p "Choose video quality:" \
|
||||||
-sep '|' -only-match <<< "$QUALITIES")
|
-sep '|' -only-match <<< "$QUALITIES")
|
||||||
QUALITY=$(awk '{print $2}' <<< "$selection")
|
QUALITY=$(awk '{print $2}' <<< "$selection")
|
||||||
|
Loading…
Reference in New Issue
Block a user