1
0
Fork 0
This commit is contained in:
xeviff 2023-06-19 22:17:35 +02:00
parent f32161c47a
commit 0d929bea49
7 changed files with 79 additions and 70 deletions

12
Series_Rescue.groovy Executable file
View File

@ -0,0 +1,12 @@
{
def relocation=true
@series/root_folders.groovy
@common/validations.groovy
@common/video.groovy
@common/audio.groovy
@common/subs.groovy
@common/classification.groovy
@series/folder_file.groovy
@common/catch.groovy
@common/functions.groovy
}

View File

@ -85,13 +85,14 @@ if (!tipoYaSeteado && llenguaOriginal=="es" && !soloLangIngles) {
// latina ***
def latinWhitelist = {try{info.ProductionCompanies.any{it=~/Corazón Films/}} catch(e){false} }()
|| {try{["Kenya Marquez"].any{director==it}}catch(err){false}}()
def latinBlacklist = ["nightmare radio"].any{ localize.Spanish.n.toLowerCase().contains(it) }
if (latinWhitelist) {
latina = true
} else if (latinBlacklist || ({ try { info.Network =~ /(?i)\bFLIXOL.\b|\b.?TVE\b|\bAntena 3\b/ } catch (e) { false } }()
|| ({ try { info.ProductionCompanies.any{it =~ /.?TVE|ESDIP|Canal Sur|Canal\+|Telecinco/}}catch(e){false}}()))
/*en seguiment*/|| numPaises == 0) {
} else if (["nightmare radio"].any{ localize.Spanish.n.toLowerCase().contains(it) }
|| numPaises == 0 /*en seguiment*/
|| {try{ info.Network =~ /(?i)\bFLIXOL.\b|\b.?TVE\b|\bAntena 3\b/ }catch(e){ false } }()
|| {try{ info.ProductionCompanies.any{it =~ /.?TVE|ESDIP|Canal Sur|Canal\+|Telecinco/} }catch(e){false}}()
) {
//latina = false (redundant)
if (numPaises == 0) notSure = true
} else {
@ -100,41 +101,21 @@ if (!tipoYaSeteado && llenguaOriginal=="es" && !soloLangIngles) {
latina = numPaisesLat>0
//double check fake latin
if (latina) {
def isActuallySpanish = certifications.size()==1 && certifications.ES!=null
def isActuallySpanish =
(certifications.size()==1 && certifications.ES!=null)
|| {try{ movie.alternativeTitles.size()==1 && movie.alternativeTitles.containsKey("ES") }catch(e){false}}()
if (isActuallySpanish) latina = false
}
}
if (!latina) espanyola = true
// española ***
/*if (!tipoYaSeteado && (numPaises>0 ? prodCountries.contains("ES") : true)) {
espanyola =
(numPaises==1 || (numPaises==2 && prodCountries.contains("ES") && prodCountries.any{ it=~/AR|PT/ }))
|| { try { info.Network =~ /(?i)\bFLIXOL.\b|\b.?TVE\b|\bAntena 3\b/ } catch (e) { false } }()
|| ({ try { info.ProductionCompanies.any{it =~ /.?TVE|ESDIP|Canal Sur|Canal\+|Telecinco/}}catch(e){false}}() && llengu.contains("spa") && (llengu.size()==1?llengu[0]=="spa":true))
|| (certifications.size()==1 && certifications.ES!=null)
|| ((llengu.size()==1 && llengu[0]=="spa") || (llengu.size()==2 && llengu.contains("spa")))
|| {try{ movie.alternativeTitles.size()==1 && movie.alternativeTitles.ES!=null} catch(e){false}}()
|| (pais=~/ES|esp/ && (!llengu.isEmpty() ? llengu.size()==1 && llengu[0]=="spa" : true))
}
if (!espanyola) latina = true*/
tipoYaSeteado = tipoYaSeteado || espanyola || latina
}
//asiaticas
def asiatica = false
if (!tipoYaSeteado && !soloLangIngles) {
//nn def paisesAsiaticos = ["CN", "HK", "JP", "KP", "KR", "TH", "NP", "TW", "PH", "MO"]
def paisesIntersec=0
def languajAsia = ["zh", "cn", "ko", "th", "vi", "ja", "id", "hi", "tl"]
//nn def machingLanguages = languajAsia.intersect(llengu).size()
def languajAsia = ["zh", "cn", "ko", "th", "vi", "ja", "id", "hi", "tl", "bo"]
asiatica = languajAsia.contains(llenguaOriginal)
//|| paisesAsiaticos.any{ pais==it } //dona falsos positius
//nn || (numPaises != 0 && {((paisesIntersec=paisesAsiaticos.intersect(prodCountries).size()) == numPaises || (/*en observacion*/paisesIntersec!=0 && !llengu.contains('eng')) ) }())
//nn || (languajAsia.any{audioLlengu.contains(it)} && prodCountries.any{paisesAsiaticos.contains(it)} && llengu.any{languajAsia.contains(it)} )
//nn || {try {director.contains("Takeshi Kitano")} catch (e) {false}}()
//|| (machingLanguages > 0 && primaryTitle!=null && localize.English.n!=primaryTitle) // titols en francès diu que es asiatica
//*nn: No Necessari (ja que amb l'idioma original crec que ja esta)
tipoYaSeteado = tipoYaSeteado || asiatica
}

View File

@ -85,6 +85,6 @@ def sanityCheck(newId) {
return oldId!=null ? oldId == newId.toString() : true
}
def normalitzarText(txt) {
return txt.replaceAll(':','.').replaceAll('\\?','¿').replaceAll('\\"','-')
return txt.replaceAll(':','.').replaceAll('\\?','¿').replaceAll(/\"|>|\*|'/,'-')
}
/***********/

View File

@ -19,20 +19,28 @@
: "microHD"
: vf
def fuente = {try{ source } catch(err){null}}()
if (fuente!=null) calidad = calidad.startsWith("micro") ? calidad : vf
if (fuente!=null) {
calidad = calidad.startsWith("micro") ? calidad : vf
if (fuente.contains("WEB-DL")) fuente = "WEB-DL"
}
/***************************/
/** Formato distribución **/
formato_distribucion = fuente!=null ? fuente : relocation ? '' :
def formato_distribucion = fuente!=null ? fuente : relocation ? '' :
fn=~/(?i)\bblu.?ray\b|\bbdrip\b/ ? (calidad=~/(?i).+rip/ ? '' : 'BDRip') :
fn=~/(?i)remux/ ? (calidad=~/(?i).+remux/ ? '' : 'BDRemux') :
fn=~/(?i)\bWEB.??(DL|RIP)\b/ ? 'WEB-DL' :
fn=~/(?i)\bWEB.?(DL|RIP)\b/ ? 'WEB-DL' :
''
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|\bM\+\b/ )
if (plataforma!=null) plataforma = plataforma.replace("MVPLUS","MV+")
formato_distribucion = formato_distribucion+(plataforma!=null?(' '+plataforma.toUpperCase()):'')
/(?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|(?<!\w)M\+(?!\w)|\bSKYSHO\b/ )
if (plataforma!=null) {
plataforma = plataforma.toUpperCase()
.replace("MVPLUS","MV+").replace("DSNY","DSN+")
}
formato_distribucion = formato_distribucion+(plataforma!=null?(' '+plataforma):'')
}
if (formato_distribucion!='') formato_distribucion=' '+formato_distribucion
/**********************************/

View File

@ -1,31 +1,32 @@
//////////////////////////////////////////////
//tria
if (esDocu) ruta = ruta_docu + "main/"
else if (esAnime) ruta = ruta_anime + "main/"
else if (infantil) ruta = ruta_infantil + "main/"
else if (esAnimacion) ruta = ruta_animacion + "main/"
else if (catalana) ruta = ruta_cat + "main/"
if (esDocu) ruta = ruta_docu + "new/"
else if (esAnime) ruta = ruta_anime + "new/"
else if (infantil) ruta = ruta_infantil + "new/"
else if (esAnimacion) ruta = ruta_animacion + "new/"
else if (catalana) ruta = ruta_cat + "new/"
else if (espanyola) {
ruta = ruta_esp
if (notSure) ruta += "to_observe/"
ruta = ruta_esp + "new/"
/*if (notSure) ruta += "to_observe/"
else if (y>2000) ruta += "sXXI/"
else ruta += "sXX/"
} else if (latina) ruta = ruta_latina + "main/"
else if (asiatica) ruta = ruta_asiaticas + "main/"
else if (esFamiliar && y>1960) ruta = ruta_familiar + "main/"
else ruta += "sXX/"*/
} else if (latina) ruta = ruta_latina + "new/"
else if (asiatica) ruta = ruta_asiaticas + "new/"
else if (esFamiliar && y>1960) ruta = ruta_familiar + "new/"
else if (y<1980) {
ruta = ruta_classic
if (y>1970) ruta += "70s/"
else ruta += "old/"
ruta = ruta_classic + "new/"
/*if (y>1970) ruta += "70s/"
else ruta += "old/"*/
} else if (y<2000) {
ruta = ruta_retro
if (y>=1990) ruta += "90s/"
else ruta += "80s/"
ruta = ruta_retro + "new/"
/*if (y>=1990) ruta += "90s/"
else ruta += "80s/"*/
}
if (ruta==ruta2000) {
if (y>=2021) ruta = ruta_estrenos + "20s/"
else if (y>=2010) ruta += "2010-2020/"
else ruta += "2000-2010/"
if (y>=2021) ruta = ruta_estrenos + "new/"// + "20s/"
else ruta += "new/"
/*else if (y>=2010) ruta += "2010-2020/"
else ruta += "2000-2010/"*/
}
/********************************************/

View File

@ -36,7 +36,7 @@ def temporada = episode.special ?
/****************************/
/**** Nombre de fichero *****/
def nombreSerie = normalitzarText({try { catalana ? localize.Catalan.ny : localize.Spanish.ny } catch (err) {localize.Spanish.ny} }())
def tituloCapitulo = {try { catalana ? localize.Catalan.t : localize.Spanish.t } catch (err) {localize.Spanish.t} }()
def tituloCapitulo = normalitzarText({try { catalana ? localize.Catalan.t : localize.Spanish.t } catch (err) {localize.Spanish.t} }())
def nombreArchivo = nombreSerie+' - '+s00e00+' - '+tituloCapitulo

View File

@ -1,16 +1,17 @@
def root = '/series/'
def rutaSeries = root+ 'Series/'
def rutaNSeries = root+'NSeries/'
def ruta_docu = root+'Series_docu/'
def ruta_animacion = root+'Series_animacion/'
def ruta_anime = root+'Series_anime/'
def ruta_antiguas = root+'Series_antiguas/'
def ruta_esp = root+'Series_esp'
def ruta_cat = root+'Series_cat'
def ruta_latina = root+'Series_lat'
def ruta_teen = root+'Series_familiar'
def ruta_infantil = root+'Series_infantil'
def ruta_programastv = root+'programas_tv'
def ruta_docu = root+'Series_docu/new/'
def ruta_animacion = root+'Series_animacion/new/'
def ruta_anime = root+'Series_anime/new/'
def ruta_antiguas = root+'Series_antiguas/new/'
def ruta_esp = root+'Series_esp/new/'
def ruta_cat = root+'Series_cat/new/'
def ruta_latina = root+'Series_lat/new/'
def ruta_teen = root+'Series_familiar/new/'
def ruta_infantil = root+'Series_infantil/new/'
def ruta_programastv = root+'programas_tv/new/'
def rutaKO = root+'error/'
def ruta = rutaNSeries
@ -19,6 +20,12 @@ try {
def tvdb = series.getExternalId('TheTVDB')
if (tvdb==null) throw new Exception("[no_id]")
if (f.toString().contains("/"+rutaSeries)) {
if (f.toString().contains('/Series/')) {
ruta = rutaSeries
}
def freshFile = ct >= '2022-03-18'
if (freshFile) {
ruta = ruta.replace('/Series/','/freshOldSeries/')
}