diff --git a/common/functions.groovy b/common/functions.groovy index 7937411..a64310a 100755 --- a/common/functions.groovy +++ b/common/functions.groovy @@ -52,6 +52,15 @@ def countAudiosInMap(audMap){ for (aud in audMap) count += aud.value.size() return count } +def getEdition (fileName) { + def pre = '{edition-' + def post = '}' + return fileName.find(/(?i)\bV\.Ext(endida)?\b|\bversi.n.ext\b/) != null ? pre+'Versión Extendida'+post : + fileName.find(/(?i)\bver\..dir(ector)?\b/) != null ? (pre+'Versión Director'+post) : + fileName.find(/\b(r|R)emas[a-z]*\b/) != null ? (pre+'Remasterizada'+post) : + fileName.find(/(?i)\bproper\b|\brepack\b/) != null ? (pre+'Versión corregida'+post) : + '' +} /********* SUBS ***************/ def handleSub(sub, capturedSubs) { def lang = sub.Language_String3 !=null ? sub.Language_String3 diff --git a/common/validations.groovy b/common/validations.groovy index 4ccb57c..599eb10 100755 --- a/common/validations.groovy +++ b/common/validations.groovy @@ -1,21 +1,24 @@ /** Tipo de archivo incorrecto **/ -if (ext==~/jpg|nfo|png|url/) { - return fn -} -else if (ext!="mkv" && ext!="avi" && ext!="mp4" && ext!="mpg") { - throw new Exception("[formato_fichero_noestarndar]") -} -//video problems -try { - video -} catch (e) { - throw new Exception("[video_roto]") -} -//no genere -try { - genres -} catch (err) { - throw new Exception("[genero_no_especificado]") +def isOnlyRelocate = {try{only_relocate} catch(e){false}}() +if (!isOnlyRelocate) { + if (ext==~/jpg|nfo|png|url/) { + return fn + } + else if (ext!="mkv" && ext!="avi" && ext!="mp4" && ext!="mpg") { + throw new Exception("[formato_fichero_noestarndar]") + } + //video problems + try { + video + } catch (e) { + throw new Exception("[video_roto]") + } + //no genere + try { + genres + } catch (err) { + throw new Exception("[genero_no_especificado]") + } } //*** Relocate Remux and UHD to Transcode input folder diff --git a/common/video.groovy b/common/video.groovy index 9643e06..08f0dca 100755 --- a/common/video.groovy +++ b/common/video.groovy @@ -35,7 +35,7 @@ if (formato_distribucion=='WEB-DL') { def plataforma = fn.find( //coge el contenido que encaja - /(?i)\bAMZN?\b|\bNF\b|\bHBO\b|\bHBO.?MAX\b|\bHMAX\b|\bHULU\b|\bA3P\b|\bDPLY\b|\bSTARZ\b|\bFILMIN\b|\bFLMN\b|\bNETFLIX\b|\bDSN.?\b|\bDSP+?\b|\bRTVE\b|\bFLIXOL.\b|(?