58 lines
1.9 KiB
Groovy
Executable File
58 lines
1.9 KiB
Groovy
Executable File
//////////////////////////////////////////////
|
|
//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/"
|
|
else if (espanyola) {
|
|
ruta = ruta_esp
|
|
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>1970) ruta = ruta_familiar + "main/"
|
|
else if (y<1980) {
|
|
ruta = ruta_classic
|
|
if (y>1970) ruta += "70s/"
|
|
else ruta += "old/"
|
|
} else if (y<2000) {
|
|
ruta = ruta_retro
|
|
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/"
|
|
}
|
|
/********************************************/
|
|
|
|
//----------------------------
|
|
//Relocation possible failures
|
|
if (relocation && {try {relocationFrom!=null} catch (err) {false}}()) {
|
|
if (!ruta.contains(relocationFrom)) {
|
|
ruta = root + relocationFrom + "to_observe/"
|
|
}
|
|
}
|
|
//----------------------------
|
|
|
|
/*** RESULTADO FINAL ***/
|
|
def inicial = (ruta==ruta_retro) ? getInicial() : ''
|
|
def tmdb = "{tmdb-"+tmdbid+"}"
|
|
def carpetaPeli = localize.Spanish.plex.name + ' ' + tmdb + '/'
|
|
|
|
def file
|
|
if ({try {only_relocate} catch (err) {false}}()) {
|
|
file = fn
|
|
} else {
|
|
def nombrePelicula_formatoPlex = {try { catalana ? localize.Catalan.n : localize.Spanish.plex.name } catch (err) {localize.Spanish.plex.name} }()
|
|
def nomPrincipal = nombrePelicula_formatoPlex + bloqueVideo + bloqueAudio + bloqueSubs
|
|
def trackerCatch = fn.find(/(?i)\bHDO(limpo)?\b|\bRedBits\b/)
|
|
def tracker = trackerCatch != null ? '['+trackerCatch.replace("HDOlimpo", "HDO")+']' : ''
|
|
|
|
file = nomPrincipal + tracker + tmdb
|
|
}
|
|
|
|
return ruta + inicial + carpetaPeli + file
|
|
/////////////////////////////////////////////////////////////////////////// |