Created
February 20, 2013 20:44
-
-
Save sprt/4999444 to your computer and use it in GitHub Desktop.
Automatically download movie and TV show subtitles with Transmission.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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