diff options
| author | Fuwn <[email protected]> | 2023-10-02 00:50:10 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-10-02 00:50:10 -0700 |
| commit | e674698a4f67b6e6f2e03af996b7db1568254c26 (patch) | |
| tree | e30aedbd28e6e69eeb5f1c675b800d3a28936e3a | |
| parent | feat(stream): chooseable language (diff) | |
| download | kaguya-e674698a4f67b6e6f2e03af996b7db1568254c26.tar.xz kaguya-e674698a4f67b6e6f2e03af996b7db1568254c26.zip | |
feat(kaguya): cookie file support
| -rw-r--r-- | src/bashly.yml | 6 | ||||
| -rw-r--r-- | src/stream_command.sh | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/bashly.yml b/src/bashly.yml index 9e14f74..761d8d7 100644 --- a/src/bashly.yml +++ b/src/bashly.yml @@ -55,13 +55,19 @@ commands: - long: --username short: -u arg: username + conflicts: [--cookies] - long: --password short: -p arg: password + conflicts: [--cookies] - long: --language short: -l arg: language default: en-US + - long: --cookies + short: -c + arg: cookies + conflicts: [--username --password] - name: x dependencies: [xdg-open, curl, echo, tr, jq] args: diff --git a/src/stream_command.sh b/src/stream_command.sh index 5c688ae..4c9e0c2 100644 --- a/src/stream_command.sh +++ b/src/stream_command.sh @@ -41,11 +41,15 @@ subtitles_command=( "${args[uri]}" ) -if [ -n "${args['--username']}" ]; then +if [ -n "${args['--username']}" ] || [ -n "${args['--password']}" ]; then subtitles_command+=(-u "${args['--username']}") subtitles_command+=(-p "${args['--password']}") fi +if [ -n "${args['--cookies']}" ]; then + subtitles_command+=(--cookies "${args['--cookies']}") +fi + "${subtitles_command[@]}" if [[ -n "${args['--fix']}" ]]; then |