mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
change ordering of watched anime to order by id
update name from queue to playlist
This commit is contained in:
parent
e2106e2186
commit
44e834c3de
8
ani-cli
8
ani-cli
@ -197,7 +197,7 @@ get_search_query() {
|
|||||||
# Construct string "<id>. <anime_name>"
|
# Construct string "<id>. <anime_name>"
|
||||||
stmt="SELECT DISTINCT id || '. ' || anime_name \
|
stmt="SELECT DISTINCT id || '. ' || anime_name \
|
||||||
FROM search_history \
|
FROM search_history \
|
||||||
ORDER BY search_date DESC;"
|
ORDER BY id DESC;"
|
||||||
# hist=$(echo "$stmt" | sqlite3 -noheader "$HISTORY_DB")
|
# hist=$(echo "$stmt" | sqlite3 -noheader "$HISTORY_DB")
|
||||||
hist=$(run_stmt "$stmt")
|
hist=$(run_stmt "$stmt")
|
||||||
|
|
||||||
@ -509,6 +509,7 @@ while getopts 'hd:HlpadP:' OPT; do
|
|||||||
[ -z "$playlist_file" ] && die "Eneter in path to playlist"
|
[ -z "$playlist_file" ] && die "Eneter in path to playlist"
|
||||||
mpv "$playlist_file"
|
mpv "$playlist_file"
|
||||||
exit 0
|
exit 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
@ -584,8 +585,8 @@ case $scrape in
|
|||||||
[ $? -ne 0 ] && die "No anime selection found"
|
[ $? -ne 0 ] && die "No anime selection found"
|
||||||
episode_selection
|
episode_selection
|
||||||
;;
|
;;
|
||||||
delete)
|
delete) ;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
{ # checking input
|
{ # checking input
|
||||||
@ -603,7 +604,6 @@ esac
|
|||||||
grep -q -w "${selection_id}" "$logfile" ||
|
grep -q -w "${selection_id}" "$logfile" ||
|
||||||
printf "%s\t%d\n" "$selection_id" $((episode + 1)) >>"$logfile"
|
printf "%s\t%d\n" "$selection_id" $((episode + 1)) >>"$logfile"
|
||||||
|
|
||||||
|
|
||||||
for ep in $episodes; do
|
for ep in $episodes; do
|
||||||
if [[ "$is_add" -eq 1 ]]; then
|
if [[ "$is_add" -eq 1 ]]; then
|
||||||
echo "ID: $selection_id"
|
echo "ID: $selection_id"
|
||||||
|
15
aniwrapper
15
aniwrapper
@ -12,7 +12,7 @@ CFG_FILE="meh.rasi"
|
|||||||
|
|
||||||
# not a wrapper around the ani-cli-rofi
|
# not a wrapper around the ani-cli-rofi
|
||||||
|
|
||||||
options="1. Stream|2. Download|3. Continue|4. Queue|5. Quit"
|
options="1. Stream|2. Download|3. Continue|4. Playlist|5. Quit"
|
||||||
|
|
||||||
choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' -config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Enter choice:")
|
choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' -config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Enter choice:")
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ elif [[ "$selection" == "4." ]]; then
|
|||||||
)
|
)
|
||||||
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
||||||
if [[ "$selection" == "1." ]]; then
|
if [[ "$selection" == "1." ]]; then
|
||||||
options="1. Streaming|2. From file|3. Quit"
|
options="1. From file|2. Streaming|3. Quit"
|
||||||
choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' -config "$CFG_DIR/$CFG_FILE" -l 4 -i -p "Enter choice:")
|
choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' -config "$CFG_DIR/$CFG_FILE" -l 4 -i -p "Enter choice:")
|
||||||
[ "$choice" == "4. Quit" ] && (
|
[ "$choice" == "4. Quit" ] && (
|
||||||
echo 'Quitting...'
|
echo 'Quitting...'
|
||||||
@ -51,11 +51,14 @@ elif [[ "$selection" == "4." ]]; then
|
|||||||
)
|
)
|
||||||
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
||||||
if [[ "$selection" == "1." ]]; then
|
if [[ "$selection" == "1." ]]; then
|
||||||
"$CMD" -p
|
# TODO: Change directory to variable set at install
|
||||||
|
PLAYLIST_DIR="$HOME/Videos/sauce"
|
||||||
|
choice=$(ls "$PLAYLIST_DIR" | rofi -dmenu -config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Choose playlist:")
|
||||||
|
# choice=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" -l 1 -i -p "Enter path to playlist")
|
||||||
|
# [ -z "$choice" ] && choice="$HOME/Videos/sauce/"
|
||||||
|
"$CMD" -P "$PLAYLIST_DIR/$choice"
|
||||||
elif [[ "$selection" == "2." ]]; then
|
elif [[ "$selection" == "2." ]]; then
|
||||||
choice=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" -l 1 -i -p "Enter path to playlist")
|
"$CMD" -p
|
||||||
[ -z "$choice" ] && choice="$HOME/Videos/sauce/"
|
|
||||||
"$CMD" -P "$choice"
|
|
||||||
fi
|
fi
|
||||||
# selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
# selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
|
||||||
elif [[ "$selection" == "2." ]]; then
|
elif [[ "$selection" == "2." ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user