Skip to content

Commit

Permalink
Script to download movies' subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Dec 25, 2015
1 parent fe0197f commit 4069838
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions utils/download_subtitle_routine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Download subtitles from all movies in a directory
MOVIE_TYPES="*.mp4 *.avi *.mkv"
PATH_MOVIES_1=/srv/deluge/torrents
PATH_MOVIES_2=/srv/deluge/external
FADES_BIN=/home/alarm/fades/bin/fades

for MOVIE_TYPE in $MOVIE_TYPES; do {
find $PATH_MOVIES_1 $PATH_MOVIES_2 -name $MOVIE_TYPE -type f -print | \
xargs -I '{}' $FADES_BIN -p python2 -d subliminal -x subliminal download -v \
-p addic7ed -p opensubtitles -p podnapisi -p thesubdb -p tvsubtitles \
-l en -l spa \
'{}'
}; done
15 changes: 15 additions & 0 deletions utils/download_torrent_subtitle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

TORRENTS_DIR=/srv/deluge/torrents

torrentid=$1
torrentname=$2
torrentpath=$TORRENTS_DIR/$3

# MP4=`/usr/bin/find $torrentpath -iname "*.mp4"`
for VIDEO in "$torrentpath"/*.mp4;
do {
/home/alarm/fades/bin/fades -p python2 -d subliminal -x subliminal download -l spa "$VIDEO"
}; done
echo `date` - "Torrent Details: " $torrentname $torrentpath $torrentid $MP4 >> /tmp/execute_script.log

0 comments on commit 4069838

Please sign in to comment.