update to scrape sbplay

This commit is contained in:
ksyasuda
2022-01-05 10:54:19 -08:00
parent 7ca1907998
commit 797df2b1fb
2 changed files with 33 additions and 43 deletions

View File

@@ -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"