54 lines
2.0 KiB
Groovy
Executable File
54 lines
2.0 KiB
Groovy
Executable File
//propi de series
|
|
def esReality = genres.any{ it =~ /Reality/ }
|
|
def tieneGAnime = genres.any{ it =~ /Anime/ }
|
|
if (!esAnime && tieneGAnime) esAnime = true
|
|
def certificacio = {try {certification} catch (err){null}}()
|
|
def esTeen = tieneFamiliar && (certificacio==null || certificacio =~ /TV-14|TV-P?G/)
|
|
|
|
//tria
|
|
/*if (tenimCat) ruta = ruta_cat
|
|
else */if (esDocu) ruta = ruta_docu
|
|
else if (esReality) ruta = ruta_programastv
|
|
else if (esAnime) ruta = ruta_anime
|
|
else if (infantil) ruta = ruta_infantil
|
|
else if (esAnimacion) ruta = ruta_animacion
|
|
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
|
|
/****************************************/
|
|
/****************************************/
|
|
|
|
|
|
|
|
/*****************************/
|
|
/**** carpetas previas *******/
|
|
def inicial = false ? getInicial()+'/' : ''
|
|
def nombreSerieEng = normalitzarText(localize.English.ny)
|
|
def tvdb = id
|
|
def cuaTvdb = "{tvdb-"+tvdb+"}"
|
|
def pathNombreSerie = '/'+nombreSerieEng+' '+cuaTvdb + '/'
|
|
|
|
def temporada = episode.special ?
|
|
'Specials'+'/' :
|
|
'Temporada '+ s.pad(2) + '/'
|
|
|
|
/****************************/
|
|
/**** Nombre de fichero *****/
|
|
def nombreSerie = normalitzarText({try { catalana ? localize.Catalan.ny : localize.Spanish.ny } catch (err) {localize.Spanish.ny} }())
|
|
def tituloCapitulo = normalitzarText({try { catalana ? localize.Catalan.t : localize.Spanish.t } catch (err) {localize.Spanish.t} }())
|
|
|
|
def nombreArchivo = nombreSerie+' - '+s00e00+' - '+tituloCapitulo
|
|
|
|
def trackerCatch = fn.find(/(?i)\bHDO(limpo)?\b|\bRedBits\b/)
|
|
def tracker = trackerCatch != null ? '['+trackerCatch.replace("HDOlimpo", "HDO")+']' : ''
|
|
|
|
/*************************/
|
|
/**** RUTA FINAL *******/
|
|
|
|
def archivo = nombreArchivo + bloqueVideo + bloqueAudio + bloqueSubs + tracker
|
|
def resultado = ruta + inicial + pathNombreSerie + temporada + archivo
|
|
return resultado |