mirror of
https://github.com/Jonny007-MKD/OTR-DecodeAll
synced 2025-01-22 08:49:50 +01:00
Merge cutDir and uncutDir into tempDir
This commit is contained in:
parent
356ca33e16
commit
3561156c46
2 changed files with 15 additions and 22 deletions
11
config
11
config
|
@ -8,8 +8,7 @@ function funcConfigPre { # These values are set at the beginning of the script
|
||||||
|
|
||||||
delugeDir="/etc/deluged" # Config dir of DelugeD
|
delugeDir="/etc/deluged" # Config dir of DelugeD
|
||||||
inDir="/Multimedia/Video/.Downloaded" # Dir with .otrkeys
|
inDir="/Multimedia/Video/.Downloaded" # Dir with .otrkeys
|
||||||
uncutDir="/Multimedia/Video/.Uncut" # Dir with uncut videos (output of decoder)
|
tempDir="/Multimedia/Video/.Temp" # Dir with decoded and cut videos (output of decoder and cutter)
|
||||||
cutDir="/Multimedia/Video/.Uncut" # Dir with cut videos (output of cutter)
|
|
||||||
outDir="/Multimedia/Video/" # Final dir with videos
|
outDir="/Multimedia/Video/" # Final dir with videos
|
||||||
|
|
||||||
torrentDb="/home/deluged/torrents.db" # File with file names and labels (see at github: OTR-TorrentDb)
|
torrentDb="/home/deluged/torrents.db" # File with file names and labels (see at github: OTR-TorrentDb)
|
||||||
|
@ -26,19 +25,19 @@ function funcConfigPre { # These values are set at the beginning of the script
|
||||||
# This way they can't be overridden, but can use the final config variables
|
# This way they can't be overridden, but can use the final config variables
|
||||||
function funcConfigPost {
|
function funcConfigPost {
|
||||||
cmdDecode="/usr/bin/otrtool" # path to otrkey decoder
|
cmdDecode="/usr/bin/otrtool" # path to otrkey decoder
|
||||||
cmdDecodeArgs="-x -e $user -p $pass -D $uncutDir" # for pyropeters otrdecoder
|
cmdDecodeArgs="-x -e $user -p $pass -D $tempDir" # for pyropeters otrdecoder
|
||||||
|
|
||||||
#cmdDecode="/home/pi/bin/qemu-x86_64 -L /home/pi/ /home/pi/bin64/otrdecoder-64"
|
#cmdDecode="/home/pi/bin/qemu-x86_64 -L /home/pi/ /home/pi/bin64/otrdecoder-64"
|
||||||
#cmdDecodeArgs="-e $user -p $pass -o "$uncutDir" -i" # for original otrdecoder
|
#cmdDecodeArgs="-e $user -p $pass -o "$tempDir" -i" # for original otrdecoder
|
||||||
|
|
||||||
#cmdDecode="/usr/bin/otrpidecoder" # path to NYrks otrdecoder
|
#cmdDecode="/usr/bin/otrpidecoder" # path to NYrks otrdecoder
|
||||||
#cmdDecodeArgs="-d -e $user -p $pass"
|
#cmdDecodeArgs="-d -e $user -p $pass"
|
||||||
#uncutDir="$inDir" # no output dir supported!
|
#tempDir="$inDir" # no output dir supported!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cmdCut="/home/deluged/multicutmkv.sh" # path to multicut
|
cmdCut="/home/deluged/multicutmkv.sh" # path to multicut
|
||||||
cmdCutArgs=
|
cmdCutArgs="-o $tempDir"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
22
otrDecodeAll
22
otrDecodeAll
|
@ -94,7 +94,7 @@ function funcPerformKodiCheck {
|
||||||
|
|
||||||
# Parse the parameters
|
# Parse the parameters
|
||||||
function funcParam {
|
function funcParam {
|
||||||
while getopts "frkvh?e:p:i:o:d:t:l:" optval; do
|
while getopts "frkvh?e:p:i:o:t:l:" optval; do
|
||||||
case $optval in
|
case $optval in
|
||||||
"f")
|
"f")
|
||||||
funcLog 4 "Set forceRun = 1"
|
funcLog 4 "Set forceRun = 1"
|
||||||
|
@ -120,13 +120,9 @@ function funcParam {
|
||||||
"o")
|
"o")
|
||||||
funcLog 4 "Set outDir = $OPTARG"
|
funcLog 4 "Set outDir = $OPTARG"
|
||||||
outDir=$OPTARG;; # different output dir
|
outDir=$OPTARG;; # different output dir
|
||||||
"d")
|
"t")
|
||||||
funcLog 4 "Set uncutDir = $OPTARG"
|
funcLog 4 "Set tempDir = $OPTARG"
|
||||||
uncutDir=$OPTARG # different uncut dir
|
tempDir=$OPTARG;; # different temp dir
|
||||||
cutDir=$OPTARG;; # different cut dir
|
|
||||||
"c")
|
|
||||||
funcLog 4 "Set delugeDir = $OPTARG"
|
|
||||||
delugeDir=$OPTARG;; # different deluge dir
|
|
||||||
"l")
|
"l")
|
||||||
funcLog 4 "Set labelFilter = $OPTARG"
|
funcLog 4 "Set labelFilter = $OPTARG"
|
||||||
labelFilter=$OPTARG;;
|
labelFilter=$OPTARG;;
|
||||||
|
@ -204,11 +200,11 @@ function funcMakeVars {
|
||||||
funcLog 5 "pathAbsEncoded: $pathAbsEncoded"
|
funcLog 5 "pathAbsEncoded: $pathAbsEncoded"
|
||||||
|
|
||||||
# This is the absolute path to the decoded file (e.g. /stuff/Good_Wife_15.02.17_23-55_sixx_50_TVOON_DE.mpg.HQ.avi)
|
# This is the absolute path to the decoded file (e.g. /stuff/Good_Wife_15.02.17_23-55_sixx_50_TVOON_DE.mpg.HQ.avi)
|
||||||
pathTmpAbsDecoded="$uncutDir/$filename"
|
pathTmpAbsDecoded="$tempDir/$filename"
|
||||||
funcLog 5 "pathTmpAbsDecoded: $pathTmpAbsDecoded"
|
funcLog 5 "pathTmpAbsDecoded: $pathTmpAbsDecoded"
|
||||||
|
|
||||||
# This is the absolute path to the cut file (e.g. /stuff/Good_Wife_15.02.17_23-55_sixx_50_TVOON_DE.mpg.HQ.avi-cut.mkv)
|
# This is the absolute path to the cut file (e.g. /stuff/Good_Wife_15.02.17_23-55_sixx_50_TVOON_DE.mpg.HQ.avi-cut.mkv)
|
||||||
pathTmpAbsCut="$cutDir/$filename$cutAppendix"
|
pathTmpAbsCut="$tempDir/$filename$cutAppendix"
|
||||||
funcLog 5 "pathTmpAbsCut: $pathTmpAbsCut"
|
funcLog 5 "pathTmpAbsCut: $pathTmpAbsCut"
|
||||||
|
|
||||||
# Now we will determine the path where to put the file in the end (depends on label and saneRenamix)
|
# Now we will determine the path where to put the file in the end (depends on label and saneRenamix)
|
||||||
|
@ -333,10 +329,8 @@ function funcProcessFiles {
|
||||||
status=2;
|
status=2;
|
||||||
fi
|
fi
|
||||||
if [ $status -eq 2 ]; then
|
if [ $status -eq 2 ]; then
|
||||||
pathTmpAbsDecoded="$pathAbsOutDecoded" # Cut the file in the output dir directly
|
pathTmpAbsDecoded="$pathAbsOutDecoded" # Use the decoded file in the output dir directly
|
||||||
funcLog 5 "pathTmpAbsDecoded: $pathTmpAbsDecoded"
|
funcLog 5 "pathTmpAbsDecoded: $pathTmpAbsDecoded"
|
||||||
pathTmpAbsCut="$pathTmpAbsDecoded$cutAppendix"
|
|
||||||
funcLog 5 "pathTmpAbsCut: $pathTmpAbsCut"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -396,7 +390,7 @@ function funcDecode {
|
||||||
|
|
||||||
if [ -f "$pathTmpAbsDecoded" ]; then
|
if [ -f "$pathTmpAbsDecoded" ]; then
|
||||||
success=1
|
success=1
|
||||||
else # If we don't find the decoded file in $uncutDir
|
else # If we don't find the decoded file in $tempDir
|
||||||
funcLog 4 "Decoding $filename"
|
funcLog 4 "Decoding $filename"
|
||||||
funcLog 5 " $cmdDecode $cmdDecodeArgs $pathAbsEncoded"
|
funcLog 5 " $cmdDecode $cmdDecodeArgs $pathAbsEncoded"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue