From 995e1e1ee371e2805ac4cd4d28df2e2dd0c62286 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 22 Sep 2023 16:43:01 -0700 Subject: feat(stream): chooseable language --- src/bashly.yml | 4 ++++ src/stream_command.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bashly.yml b/src/bashly.yml index 19c4955..9e14f74 100644 --- a/src/bashly.yml +++ b/src/bashly.yml @@ -58,6 +58,10 @@ commands: - long: --password short: -p arg: password + - long: --language + short: -l + arg: language + default: en-US - name: x dependencies: [xdg-open, curl, echo, tr, jq] args: diff --git a/src/stream_command.sh b/src/stream_command.sh index 32b1e65..5c688ae 100644 --- a/src/stream_command.sh +++ b/src/stream_command.sh @@ -35,7 +35,7 @@ subtitles_command=( '--cookies-from-browser' 'firefox' '--no-download' '-o' '/tmp/skyla_subtitles' - '--sub-lang' 'en-US' + '--sub-lang' "${args['--language']}" '--write-subs' '--user-agent' "${user_agent}" "${args[uri]}" @@ -67,7 +67,7 @@ if [ -n "${args['--username']}" ]; then fi memento \ - --sub-file="/tmp/skyla_subtitles.en-US.ass" \ + --sub-file="/tmp/skyla_subtitles.${args['--language']}.ass" \ "$("${media_command[@]}")" rm /tmp/skyla_subtitles.*.ass -- cgit v1.2.3