sane-bt-add: add a "--series <name>" flag to control download location

This commit is contained in:
2023-03-26 08:50:53 +00:00
parent 5bb31aa5da
commit 50cec94164

View File

@@ -5,7 +5,7 @@ set -e
endpoint=https://bt.uninsane.org/transmission/rpc
PASS=$(sudo cat /run/secrets/transmission_passwd)
options=$(getopt -l film,prefix: -- "" "${@}")
options=$(getopt -l film,series:,prefix: -- "" "${@}")
eval "set -- ${options}"
prefix=
@@ -20,6 +20,11 @@ while true; do
prefix=Videos/Film/
shift
;;
(--series)
shift
prefix=Videos/Shows/"$1"/
shift
;;
(--)
shift
if [ $# -eq 1 ]; then