mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2025-12-07 14:53:37 -08:00
update to scrape sbplay
This commit is contained in:
11
aniwrapper
11
aniwrapper
@@ -9,9 +9,8 @@ CMD="/usr/bin/ani-cli"
|
||||
DEFAULT_DOWNLOAD="$HOME/Videos/sauce"
|
||||
CFG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/aniwrapper"
|
||||
CFG_FILE="aniwrapper.rasi"
|
||||
QUALITIES="1. best (default)|2. 1080p|3. 720p|4. 480p|5. 360p|6. worst"
|
||||
QUALITY="best"
|
||||
PLAYER_CMD="mpv -config-dir ${XDG_CONFIG_HOME:-$HOME/.config}/mpv"
|
||||
QUALITIES="1. high|2. normal (default)|3. low"
|
||||
QUALITY=normal
|
||||
GET_QUALITY=0
|
||||
VERBOSE=0
|
||||
IS_ROFI=1
|
||||
@@ -20,7 +19,6 @@ IS_PLAY_FROM_FILE=0
|
||||
|
||||
quit="6. Quit"
|
||||
options="1. Stream|2. Download|3. Continue|4. Play from File|5. Sync History|$quit"
|
||||
playable="\.mp4|\.mkv|\.ts|\.mp3"
|
||||
|
||||
#############
|
||||
# Functions #
|
||||
@@ -64,11 +62,12 @@ create_default_download() {
|
||||
get_quality() {
|
||||
if [ "$IS_ROFI" -eq 1 ]; then
|
||||
selection=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
|
||||
-l 6 -theme-str 'listview {columns: 1;}' -p "Choose video quality:" \
|
||||
-l 3 -selected-row 1 \
|
||||
-theme-str 'listview {columns: 1;}' -p "Choose video quality:" \
|
||||
-sep '|' <<< "$QUALITIES")
|
||||
QUALITY=$(awk '{print $2}' <<< "$selection")
|
||||
else
|
||||
printf "%s" "Enter quality [ best|1080|720|480|360|worst ]: "
|
||||
printf "%s" "Enter quality [$QUALITIES]: "
|
||||
read -r QUALITY
|
||||
fi
|
||||
log "selected quality: $QUALITY"
|
||||
|
||||
Reference in New Issue
Block a user