Shell script to decode all downloaded *.otrkey files, send them to multicut, create folders with appropriate file names and move the final movie files there (working with XMBC)
The config file provides a default configuration. Some parts can be overridden by command line parameters, other variables shall use those parameters. Thus the config file is divided in two parts (functions): funcConfigPre and funcConfigPost.
In funcConfigPre the following values have to be set:
user="OTR-User"
pass="OTR-Password"
delugeDir="/etc/deluged" # Config dir of DelugeD
inDir="/Multimedia/Video/.Downloaded" # Dir with .otrkeys
uncutDir="/Multimedia/Video/.Uncut" # Dir with uncut videos (output of decoder)
cutDir="/Multimedia/Video/.Uncut" # Dir with cut videos (output of cutter)
outDir="/Multimedia/Video/" # Final dir with videos
torrentDb="/home/deluged/torrents.db" # File with file names and labels (see at github: OTR-TorrentDb)
# Possible labels: docu, tvserie, movie, movie-en
# With these labels the videos will be sorted in subfolders of $outDir
xbmcUrl="user:password@localhost:8080" # Specify user, password and port for Kodi JSON API (HTTP interface)
# With this value the script will check whether Kodi is running to prevent stuttering playback
logFile="/home/deluged/otrDecodeAll.log" # path to the log file