This commit is contained in:
parent
f32161c47a
commit
0d929bea49
|
@ -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
|
||||||
|
}
|
|
@ -85,13 +85,14 @@ if (!tipoYaSeteado && llenguaOriginal=="es" && !soloLangIngles) {
|
||||||
// latina ***
|
// latina ***
|
||||||
def latinWhitelist = {try{info.ProductionCompanies.any{it=~/Corazón Films/}} catch(e){false} }()
|
def latinWhitelist = {try{info.ProductionCompanies.any{it=~/Corazón Films/}} catch(e){false} }()
|
||||||
|| {try{["Kenya Marquez"].any{director==it}}catch(err){false}}()
|
|| {try{["Kenya Marquez"].any{director==it}}catch(err){false}}()
|
||||||
def latinBlacklist = ["nightmare radio"].any{ localize.Spanish.n.toLowerCase().contains(it) }
|
|
||||||
|
|
||||||
if (latinWhitelist) {
|
if (latinWhitelist) {
|
||||||
latina = true
|
latina = true
|
||||||
} else if (latinBlacklist || ({ try { info.Network =~ /(?i)\bFLIXOL.\b|\b.?TVE\b|\bAntena 3\b/ } catch (e) { false } }()
|
} else if (["nightmare radio"].any{ localize.Spanish.n.toLowerCase().contains(it) }
|
||||||
|| ({ try { info.ProductionCompanies.any{it =~ /.?TVE|ESDIP|Canal Sur|Canal\+|Telecinco/}}catch(e){false}}()))
|
|| numPaises == 0 /*en seguiment*/
|
||||||
/*en seguiment*/|| numPaises == 0) {
|
|| {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)
|
//latina = false (redundant)
|
||||||
if (numPaises == 0) notSure = true
|
if (numPaises == 0) notSure = true
|
||||||
} else {
|
} else {
|
||||||
|
@ -100,41 +101,21 @@ if (!tipoYaSeteado && llenguaOriginal=="es" && !soloLangIngles) {
|
||||||
latina = numPaisesLat>0
|
latina = numPaisesLat>0
|
||||||
//double check fake latin
|
//double check fake latin
|
||||||
if (latina) {
|
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 (isActuallySpanish) latina = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!latina) espanyola = true
|
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
|
tipoYaSeteado = tipoYaSeteado || espanyola || latina
|
||||||
}
|
}
|
||||||
|
|
||||||
//asiaticas
|
//asiaticas
|
||||||
def asiatica = false
|
def asiatica = false
|
||||||
if (!tipoYaSeteado && !soloLangIngles) {
|
if (!tipoYaSeteado && !soloLangIngles) {
|
||||||
//nn def paisesAsiaticos = ["CN", "HK", "JP", "KP", "KR", "TH", "NP", "TW", "PH", "MO"]
|
|
||||||
def paisesIntersec=0
|
def paisesIntersec=0
|
||||||
def languajAsia = ["zh", "cn", "ko", "th", "vi", "ja", "id", "hi", "tl"]
|
def languajAsia = ["zh", "cn", "ko", "th", "vi", "ja", "id", "hi", "tl", "bo"]
|
||||||
//nn def machingLanguages = languajAsia.intersect(llengu).size()
|
|
||||||
asiatica = languajAsia.contains(llenguaOriginal)
|
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
|
tipoYaSeteado = tipoYaSeteado || asiatica
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,6 @@ def sanityCheck(newId) {
|
||||||
return oldId!=null ? oldId == newId.toString() : true
|
return oldId!=null ? oldId == newId.toString() : true
|
||||||
}
|
}
|
||||||
def normalitzarText(txt) {
|
def normalitzarText(txt) {
|
||||||
return txt.replaceAll(':','.').replaceAll('\\?','¿').replaceAll('\\"','-')
|
return txt.replaceAll(':','.').replaceAll('\\?','¿').replaceAll(/\"|>|\*|'/,'-')
|
||||||
}
|
}
|
||||||
/***********/
|
/***********/
|
||||||
|
|
|
@ -19,20 +19,28 @@
|
||||||
: "microHD"
|
: "microHD"
|
||||||
: vf
|
: vf
|
||||||
def fuente = {try{ source } catch(err){null}}()
|
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 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)\bblu.?ray\b|\bbdrip\b/ ? (calidad=~/(?i).+rip/ ? '' : 'BDRip') :
|
||||||
fn=~/(?i)remux/ ? (calidad=~/(?i).+remux/ ? '' : 'BDRemux') :
|
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') {
|
if (formato_distribucion=='WEB-DL') {
|
||||||
def plataforma = fn.find( //coge el contenido que encaja
|
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/ )
|
/(?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.replace("MVPLUS","MV+")
|
if (plataforma!=null) {
|
||||||
formato_distribucion = formato_distribucion+(plataforma!=null?(' '+plataforma.toUpperCase()):'')
|
plataforma = plataforma.toUpperCase()
|
||||||
|
.replace("MVPLUS","MV+").replace("DSNY","DSN+")
|
||||||
|
}
|
||||||
|
formato_distribucion = formato_distribucion+(plataforma!=null?(' '+plataforma):'')
|
||||||
}
|
}
|
||||||
if (formato_distribucion!='') formato_distribucion=' '+formato_distribucion
|
if (formato_distribucion!='') formato_distribucion=' '+formato_distribucion
|
||||||
/**********************************/
|
/**********************************/
|
||||||
|
|
|
@ -1,31 +1,32 @@
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
//tria
|
//tria
|
||||||
if (esDocu) ruta = ruta_docu + "main/"
|
if (esDocu) ruta = ruta_docu + "new/"
|
||||||
else if (esAnime) ruta = ruta_anime + "main/"
|
else if (esAnime) ruta = ruta_anime + "new/"
|
||||||
else if (infantil) ruta = ruta_infantil + "main/"
|
else if (infantil) ruta = ruta_infantil + "new/"
|
||||||
else if (esAnimacion) ruta = ruta_animacion + "main/"
|
else if (esAnimacion) ruta = ruta_animacion + "new/"
|
||||||
else if (catalana) ruta = ruta_cat + "main/"
|
else if (catalana) ruta = ruta_cat + "new/"
|
||||||
else if (espanyola) {
|
else if (espanyola) {
|
||||||
ruta = ruta_esp
|
ruta = ruta_esp + "new/"
|
||||||
if (notSure) ruta += "to_observe/"
|
/*if (notSure) ruta += "to_observe/"
|
||||||
else if (y>2000) ruta += "sXXI/"
|
else if (y>2000) ruta += "sXXI/"
|
||||||
else ruta += "sXX/"
|
else ruta += "sXX/"*/
|
||||||
} else if (latina) ruta = ruta_latina + "main/"
|
} else if (latina) ruta = ruta_latina + "new/"
|
||||||
else if (asiatica) ruta = ruta_asiaticas + "main/"
|
else if (asiatica) ruta = ruta_asiaticas + "new/"
|
||||||
else if (esFamiliar && y>1960) ruta = ruta_familiar + "main/"
|
else if (esFamiliar && y>1960) ruta = ruta_familiar + "new/"
|
||||||
else if (y<1980) {
|
else if (y<1980) {
|
||||||
ruta = ruta_classic
|
ruta = ruta_classic + "new/"
|
||||||
if (y>1970) ruta += "70s/"
|
/*if (y>1970) ruta += "70s/"
|
||||||
else ruta += "old/"
|
else ruta += "old/"*/
|
||||||
} else if (y<2000) {
|
} else if (y<2000) {
|
||||||
ruta = ruta_retro
|
ruta = ruta_retro + "new/"
|
||||||
if (y>=1990) ruta += "90s/"
|
/*if (y>=1990) ruta += "90s/"
|
||||||
else ruta += "80s/"
|
else ruta += "80s/"*/
|
||||||
}
|
}
|
||||||
if (ruta==ruta2000) {
|
if (ruta==ruta2000) {
|
||||||
if (y>=2021) ruta = ruta_estrenos + "20s/"
|
if (y>=2021) ruta = ruta_estrenos + "new/"// + "20s/"
|
||||||
else if (y>=2010) ruta += "2010-2020/"
|
else ruta += "new/"
|
||||||
else ruta += "2000-2010/"
|
/*else if (y>=2010) ruta += "2010-2020/"
|
||||||
|
else ruta += "2000-2010/"*/
|
||||||
}
|
}
|
||||||
/********************************************/
|
/********************************************/
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ def temporada = episode.special ?
|
||||||
/****************************/
|
/****************************/
|
||||||
/**** Nombre de fichero *****/
|
/**** Nombre de fichero *****/
|
||||||
def nombreSerie = normalitzarText({try { catalana ? localize.Catalan.ny : localize.Spanish.ny } catch (err) {localize.Spanish.ny} }())
|
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
|
def nombreArchivo = nombreSerie+' - '+s00e00+' - '+tituloCapitulo
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
def root = '/series/'
|
def root = '/series/'
|
||||||
|
|
||||||
def rutaSeries = root+ 'Series/'
|
def rutaSeries = root+ 'Series/'
|
||||||
def rutaNSeries = root+'NSeries/'
|
def rutaNSeries = root+'NSeries/'
|
||||||
def ruta_docu = root+'Series_docu/'
|
def ruta_docu = root+'Series_docu/new/'
|
||||||
def ruta_animacion = root+'Series_animacion/'
|
def ruta_animacion = root+'Series_animacion/new/'
|
||||||
def ruta_anime = root+'Series_anime/'
|
def ruta_anime = root+'Series_anime/new/'
|
||||||
def ruta_antiguas = root+'Series_antiguas/'
|
def ruta_antiguas = root+'Series_antiguas/new/'
|
||||||
def ruta_esp = root+'Series_esp'
|
def ruta_esp = root+'Series_esp/new/'
|
||||||
def ruta_cat = root+'Series_cat'
|
def ruta_cat = root+'Series_cat/new/'
|
||||||
def ruta_latina = root+'Series_lat'
|
def ruta_latina = root+'Series_lat/new/'
|
||||||
def ruta_teen = root+'Series_familiar'
|
def ruta_teen = root+'Series_familiar/new/'
|
||||||
def ruta_infantil = root+'Series_infantil'
|
def ruta_infantil = root+'Series_infantil/new/'
|
||||||
def ruta_programastv = root+'programas_tv'
|
def ruta_programastv = root+'programas_tv/new/'
|
||||||
|
|
||||||
def rutaKO = root+'error/'
|
def rutaKO = root+'error/'
|
||||||
def ruta = rutaNSeries
|
def ruta = rutaNSeries
|
||||||
|
@ -19,6 +20,12 @@ try {
|
||||||
def tvdb = series.getExternalId('TheTVDB')
|
def tvdb = series.getExternalId('TheTVDB')
|
||||||
if (tvdb==null) throw new Exception("[no_id]")
|
if (tvdb==null) throw new Exception("[no_id]")
|
||||||
|
|
||||||
if (f.toString().contains("/"+rutaSeries)) {
|
if (f.toString().contains('/Series/')) {
|
||||||
ruta = rutaSeries
|
ruta = rutaSeries
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def freshFile = ct >= '2022-03-18'
|
||||||
|
|
||||||
|
if (freshFile) {
|
||||||
|
ruta = ruta.replace('/Series/','/freshOldSeries/')
|
||||||
|
}
|
Loading…
Reference in New Issue