1
0
Fork 0
mirror of https://github.com/Jonny007-MKD/OTR-DecodeAll synced 2024-09-19 04:30:57 +02:00
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 Kodi)
Find a file
2015-03-06 22:55:23 +01:00
.gitignore Added sample config file 2014-08-06 18:31:44 +02:00
config Moved logLevel before addLabel 2015-03-02 17:59:26 +01:00
LICENSE Initial commit 2014-08-06 18:09:07 +02:00
otrDecodeAll Do not delete no files (empty string) 2015-03-06 22:55:23 +01:00
README.md Added config description 2015-02-24 15:07:15 +01:00

OTR-DecodeAll

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)

Configuration

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
# log levels: 0=off; 1=error; 2=warn; 3=info; 4 debug; 5 verbose debug
logLevel=2                              # level, which messages shall be written into the log.
echoLevel=5                             # level, which messages shall be written to stdout.

In funcConfigPost you can use the above variables. Their content may be modified by command line parameters. cmdDecode="/usr/bin/otrtool" # path to otrkey decoder cmdDecodeArgs="-x -e $user -p $pass -D $uncutDir" # for peropeters otrdecoder

#cmdDecode="/home/pi/bin/qemu-x86_64 -L /home/pi/otr/otr /home/pi/otr/otr/bin64/otrdecoder-64 "
#cmdDecodeArgs="-e $user -p $pass -o "$uncutDir" -i" # for original otrdecoder

cmdCut="/home/deluged/multicutmkv.sh"             # path to multicut. Not yet implemented.
cmdCutArgs=

cmdSaneRenamix="/home/deluged/saneRenamix.sh"     # path to saneRenamix script. Leave empty to disable
cmdSaneRenamixArgs="-s -f"