subs.sh 345 B

1234567891011121314151617181920
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. DIR="subs"
  4. mkdir -p "$DIR"
  5. languages=(en ru de pl)
  6. cmd(){
  7. local video="$1"
  8. for lang in "${languages[@]}"; do
  9. subliminal --debug --opensubtitles "zadca123" "Zadca123@" download -l "$lang" -d "$DIR" "$video"
  10. done
  11. }
  12. for video in "$@"; do
  13. cmd "$video" &
  14. done
  15. wait