From f41fc08583273786c9887be7d2e34a30a3c6f87f Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 3 Mar 2021 21:01:28 -0500 Subject: [PATCH] v1.0.14 - New hidden feature, detected forced subs and use alternate SMA config The script will detect forced subs in a video file and its now possible to have 2 configs per category to handle them differently -sma-forced.ini -sma.ini The idea behind this, is to allow further customize how you handle processing the files with sma --- root/scripts/video-pp.bash | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/root/scripts/video-pp.bash b/root/scripts/video-pp.bash index d7c08d0..7c21390 100644 --- a/root/scripts/video-pp.bash +++ b/root/scripts/video-pp.bash @@ -11,7 +11,7 @@ function Configuration { log "##### SABnzbd Category: $category" log "##### DOCKER: $TITLE" log "##### SCRIPT: Video Post Processor ($TITLESHORT)" - log "##### SCRIPT VERSION: 1.0.13" + log "##### SCRIPT VERSION: 1.0.14" log "##### DOCKER VERSION: $VERSION" log "##### CONFIGURATION VERIFICATION" @@ -337,9 +337,22 @@ function Main { if [ -f /usr/local/sma/config/sma.log ]; then rm /usr/local/sma/config/sma.log fi + + # use forced config if found + if [ -f "/config/scripts/configs/$5-sma-forced.ini" ]; then + if [ ! -z "${SubtitleTracksLanguageForced}" ]; then + smaconfig="/config/scripts/configs/$5-sma-forced.ini" + else + smaconfig="/config/scripts/configs/$5-sma.ini" + fi + else + smaconfig="/config/scripts/configs/$5-sma.ini" + fi + log "===START SMA" + # Manual run of Sickbeard MP4 Automator - if python3 /usr/local/sma/manual.py --config "/config/scripts/configs/$5-sma.ini" -i "${basefilename}.${extension}" $tagging; then + if python3 /usr/local/sma/manual.py --config "$smaconfig" -i "${basefilename}.${extension}" $tagging; then sleep 0.01 else log "ERROR: SMA Processing Error"