1
0
Fork 0

isSerie, new rootFolders

This commit is contained in:
Xavier Fontanet 2023-07-18 13:45:49 +02:00
parent cdf6169586
commit 356a5178fa
8 changed files with 78 additions and 59 deletions

View File

@ -0,0 +1,13 @@
{
def hardlink=true
@movies/init_newMovies.groovy
@movies/root_folders.groovy
@common/validations.groovy
@common/video.groovy
@common/audio.groovy
@common/subs.groovy
@common/classification.groovy
@movies/folder_file.groovy
@common/catch.groovy
@common/functions.groovy
}

View File

@ -0,0 +1,13 @@
{
def hardlink=true
def relocation=false
@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

@ -11,7 +11,6 @@ if (pais==null) pais = {try{info.country} catch (err) {null}}()
def numPaises = prodCountries.size()
def llengu = {try {def langs=[]; for (lan in languages) langs.add(lan.toString()); return langs } catch(err) {[]}}()
def audioLlengu = {try {def langs=[]; for (lan in audioLanguages) langs.add(lan.toString()); return langs } catch(err) {[]}}()
def soloLangIngles = llengu.size()==1 && llengu[0]=="eng"
def llenguaOriginal = {try{info.OriginalLanguage} catch(e){null}}()
//animacion (no concluyente)
@ -81,7 +80,7 @@ def espanyola = llenguaOriginal=='gl' || llenguaOriginal=='eu'
def latina = ["che: el argentino"].any{localize.Spanish.n.toLowerCase().contains(it)}
def notSure = false
tipoYaSeteado == tipoYaSeteado || esAnimacion || catalana || espanyola || latina
if (!tipoYaSeteado && llenguaOriginal=~/es|spa/ && !soloLangIngles) {
if (!tipoYaSeteado && llenguaOriginal=~/es|spa/) {
// latina ***
def latinWhitelist = {try{info.ProductionCompanies.any{it=~/Corazón Films/}} catch(e){false} }()
|| {try{["Kenya Marquez"].any{director==it}}catch(err){false}}()
@ -113,9 +112,10 @@ if (!tipoYaSeteado && llenguaOriginal=~/es|spa/ && !soloLangIngles) {
//asiaticas
def asiatica = false
if (!tipoYaSeteado && !soloLangIngles) {
if (!tipoYaSeteado) {
def paisesIntersec=0
def languajAsia = ["zh", "cn", "ko", "th", "vi", "ja", "id", "hi", "tl", "bo"]
def languajAsia = isMovie ? ["zh", "cn", "ko", "th", "vi", "ja", "id", "hi", "tl", "bo", "te"]
: ["zho", "cn", "kor", "tha", "vie", "jpn", "ind", "hin", "tgl", "bod"]
asiatica = languajAsia.contains(llenguaOriginal)
tipoYaSeteado = tipoYaSeteado || asiatica
}

View File

@ -23,10 +23,13 @@ def peso = bytes.toString().before(' ').toDouble()
def numericBps = (mbps.toString().before(' ').toDouble()*1000000).round()
def es1080 = vf ==~ '1080.'
def es1080Remux = peso > 15 && numericBps >= 18000000
if (vf ==~ '2160.' || (es1080 && es1080Remux)) return root+"to_transcode/" + localize.Spanish.plex.name + '/' + fn
//if (vf ==~ '2160.' || (es1080 && es1080Remux)) return root+"to_transcode/" + localize.Spanish.plex.name + '/' + fn
/* SANITY CHECK */
if (relocation && !sanityCheck(tmdbid))
return root + relocationFrom + "to_check_name/" + localize.Spanish.plex.name + '/' + fn
//return '@@@@@@ Names Sanity Check KO @@@@@@@ --> New name: '+localize.Spanish.n+' with tmdb='+tmdbid
/********************************/
def isMovie = {try{movie!=null} catch(e){false}}()
def isSerie = {try{series!=null} catch(e){false}}()

View File

@ -1,30 +1,30 @@
//////////////////////////////////////////////
//tria
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/"
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/"
else if (espanyola) {
ruta = ruta_esp + "new/"
ruta = ruta_esp + "main/"
/*if (notSure) ruta += "to_observe/"
else if (y>2000) ruta += "sXXI/"
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 (latina) ruta = ruta_latina + "main/"
else if (asiatica) ruta = ruta_asiaticas + "main/"
else if (esFamiliar && y>1960) ruta = ruta_familiar + "main/"
else if (y<1980) {
ruta = ruta_classic + "new/"
ruta = ruta_classic + "main/"
/*if (y>1970) ruta += "70s/"
else ruta += "old/"*/
} else if (y<2000) {
ruta = ruta_retro + "new/"
ruta = ruta_retro + "main/"
/*if (y>=1990) ruta += "90s/"
else ruta += "80s/"*/
}
if (ruta==ruta2000) {
if (y>=2021) ruta = ruta_estrenos + "new/"// + "20s/"
else ruta += "new/"
if (y>=2021) ruta = ruta_estrenos + "main/"// + "20s/"
else ruta += "main/"
/*else if (y>=2010) ruta += "2010-2020/"
else ruta += "2000-2010/"*/
}

View File

@ -1,19 +1,19 @@
/** RUTAS **/
def root = '/pelis/'
def ruta2000 = root+"Pelis/"
def root = {try {hardlink} catch (err) {false}}() ? '/data/media/movies/' : '/pelis/'
def ruta2000 = root+"Pelis_2000/"
def ruta = ruta2000
def ruta_docu = root+"Documentales/"
def ruta_anime = root+"Pelis_anime/"
def ruta_animacion = root+"Pelis_animacion/"
def ruta_infantil = root+"Pelis_infantiles/"
def ruta_familiar = root+"Pelis_familiar/"
def ruta_esp = root+"Pelis_esp/"
def ruta_latina = root+"Pelis_lat/"
def ruta_cat = root+"Pelis_cat/"
def ruta_retro = root+"Pelis_retro/"
def ruta_estrenos = root+"Pelis_estrenos/"
def ruta_classic = root+"Pelis_classic/"
def ruta_asiaticas = root+"Pelis_asiaticas/"
def ruta_anime = root+"Pelis_Anime/"
def ruta_animacion = root+"Pelis_Animacio/"
def ruta_infantil = root+"Pelis_Infantil/"
def ruta_familiar = root+"Pelis_Familiar/"
def ruta_esp = root+"Pelis_Hispano/"
def ruta_latina = root+"Pelis_Latin/"
def ruta_cat = root+"Pelis_Catala/"
def ruta_retro = root+"Pelis_Retro/"
def ruta_estrenos = root+"Pelis_NewAge/"
def ruta_classic = root+"Pelis_Classic/"
def ruta_asiaticas = root+"Pelis_Asia/"
def rutaKO = root+"error/"
/**********/

View File

@ -16,6 +16,7 @@ else if (catalana) ruta = ruta_cat
else if (espanyola) ruta = ruta_esp
else if (catalana) ruta = ruta_cat
else if (latina) ruta = ruta_latina
else if (asiatica) ruta = ruta_asia
else if (y < 2000) ruta = ruta_antiguas
else if (esTeen) ruta = ruta_teen
/****************************************/
@ -25,8 +26,9 @@ else if (esTeen) ruta = ruta_teen
/*****************************/
/**** carpetas previas *******/
def inicial = ruta==rutaSeries ? getInicial()+'/' : ''
def inicial = false ? getInicial()+'/' : ''
def nombreSerieEng = normalitzarText(localize.English.ny)
def tvdb = id
def cuaTvdb = "{tvdb-"+tvdb+"}"
def pathNombreSerie = '/'+nombreSerieEng+' '+cuaTvdb + '/'

View File

@ -1,31 +1,19 @@
def root = '/series/'
def root = {try {hardlink} catch (err) {false}}() ? '/data/media/tv/' : '/series/'
def rutaSeries = root+ 'Series/'
def rutaNSeries = root+'NSeries/'
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 rutaSeries = root+ 'Series/new/'
def ruta_docu = root+'Series_Docu/main/'
def ruta_animacion = root+'Series_Animacio/main/'
def ruta_anime = root+'Series_Anime/main/'
def ruta_asia = root+'Series_Asia/main/'
def ruta_antiguas = root+'Series_Retro/main/'
def ruta_esp = root+'Series_Hispano/main/'
def ruta_cat = root+'Series_Catala/main/'
def ruta_latina = root+'Series_lat/main/'
def ruta_teen = root+'Series_familiar/main/'
def ruta_infantil = root+'Series_Infantil/main/'
def ruta_programastv = root+'programas_tv/main/'
def rutaKO = root+'error/'
def ruta = rutaNSeries
def ruta = rutaSeries
try {
def tvdb = series.getExternalId('TheTVDB')
if (tvdb==null) throw new Exception("[no_id]")
if (f.toString().contains('/Series/')) {
ruta = rutaSeries
}
def freshFile = ct >= '2022-03-18'
if (freshFile) {
ruta = ruta.replace('/Series/','/freshOldSeries/')
}
try {