update aniwrapper sync to pass verbose option

This commit is contained in:
ksyasuda 2021-11-22 12:42:07 -08:00
parent ee507bd220
commit 78b8dbb3eb

View File

@ -61,14 +61,14 @@ log() {
selection=$(printf "%s\n" "$choice" | awk '{ print $1 }')
case "$selection" in
1.)
1.)
# ---------------------------------------------------------------------------
# streaming
# ---------------------------------------------------------------------------
log "Streaming mode"
run
;;
2.)
2.)
# ---------------------------------------------------------------------------
# download
# ---------------------------------------------------------------------------
@ -79,7 +79,7 @@ case "$selection" in
[ "$dl_dir" == "" ] && dl_dir="$DEFAULT_DOWNLOAD"
run -d "$dl_dir"
;;
3.)
3.)
# ---------------------------------------------------------------------------
# continue
@ -87,7 +87,7 @@ case "$selection" in
log "Continue watching"
run -H
;;
4.)
4.)
# ---------------------------------------------------------------------------
# playlist mode
# ---------------------------------------------------------------------------
@ -202,7 +202,7 @@ case "$selection" in
fi
fi
;;
5.)
5.)
log "Sync history database"
username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
-l 1 -p "Enter the username of the remote user:")
@ -225,9 +225,11 @@ case "$selection" in
-l 1 -p "Enter path to private key (leave blank if not needed or if unsure):")
if [[ -z "$keypath" ]]; then
printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "" | ani-cli -s
printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "" | run -s
# printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "" | ani-cli -s
else
printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | ani-cli -s
# printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | ani-cli -s
printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | run -s
fi
if [[ "$?" -ne 0 ]]; then
@ -238,14 +240,14 @@ case "$selection" in
exit 0
fi
;;
6.)
6.)
# ---------------------------------------------------------------------------
# get out
# ---------------------------------------------------------------------------
printf "%s\n" "Quitting..."
exit 0
;;
*)
*)
log "Invalid choice..."
exit 1
;;