Skip to content

Instantly share code, notes, and snippets.

@sprt
Created February 20, 2013 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sprt/4999444 to your computer and use it in GitHub Desktop.
Save sprt/4999444 to your computer and use it in GitHub Desktop.
Automatically download movie and TV show subtitles with Transmission.
#!/bin/sh
# This will download the subtitles (if found) for the downloaded movie/TV show.
# Prerequisite: # pip install subliminal
cd $TR_TORRENT_DIR
if [ -d $TR_TORRENT_NAME ]; then
video_file=$(find $TR_TORRENT_DIR -name "*.avi" -o -name "*.mkv" \
-o -name "*.mp4" -o -name "*.rar" | head -n 1)
else
video_file="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
fi
subliminal -l en -s opensubtitles $video_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment