first adjust to new version
This commit is contained in:
parent
a00de82a78
commit
9fcfc3cbb4
|
@ -175,19 +175,20 @@ try { //empieza el script
|
||||||
/**************/
|
/**************/
|
||||||
|
|
||||||
/******* Calidad: División en carpetas y definición nombre fichero ******/
|
/******* Calidad: División en carpetas y definición nombre fichero ******/
|
||||||
def peso = bytes.GB
|
def peso = bytes.toString().before(' ').toDouble()
|
||||||
|
def numericBps = (mbps.toString().before(' ').toDouble()*1000000).round()
|
||||||
def calidad =
|
def calidad =
|
||||||
['480p', '576p', '360p', '240p'].contains(vf) ? 'SD' //SD
|
['480p', '576p', '360p', '240p'].contains(vf) ? 'SD' //SD
|
||||||
: (vf == '2160p') ? //4K
|
: (vf == '2160p') ? //4K
|
||||||
(peso > 30 && bitrate >= 26000000)
|
(peso > 30 && numericBps >= 26000000)
|
||||||
? "4K-UHDRemux"
|
? "4K-UHDRemux"
|
||||||
: (peso > 15)
|
: (peso > 15)
|
||||||
? "4K-UHDRip"
|
? "4K-UHDRip"
|
||||||
: "4K-MicroUHD"
|
: "4K-MicroUHD"
|
||||||
: (vf == '1080p') ? //1080
|
: (vf == '1080p') ? //1080
|
||||||
(peso > 15 && bitrate >= 18000000)
|
(peso > 15 && numericBps >= 18000000)
|
||||||
? "1080-BDRemux"
|
? "1080-BDRemux"
|
||||||
: (bitrate > 8000000)
|
: (numericBps > 8000000)
|
||||||
? "1080-HD"
|
? "1080-HD"
|
||||||
: "1080-MicroHD"
|
: "1080-MicroHD"
|
||||||
: vf //720
|
: vf //720
|
||||||
|
@ -381,9 +382,9 @@ try { //empieza el script
|
||||||
|
|
||||||
/**** Profundidad vídeo ****/
|
/**** Profundidad vídeo ****/
|
||||||
def myBitrate = 'noBRdef'
|
def myBitrate = 'noBRdef'
|
||||||
try{ myBitrate = (mbps.round(1)+"Mbps").replace(/.0/,'') }catch(err){}
|
try{ myBitrate = mbps.replace(/.0/,'').replace(' ','') }catch(err){}
|
||||||
def myFps = ' FRvar'
|
def myFps = ' FRvar'
|
||||||
try { myFps = ' '+(fps.round(1)+"fps").replace(/.0/,'') }catch(err){}
|
try { myFps = ' '+fps.replace(/.0/,'').replace(' ','') }catch(err){}
|
||||||
/***************************/
|
/***************************/
|
||||||
|
|
||||||
/* RESULTADO MEDIAINFO */
|
/* RESULTADO MEDIAINFO */
|
||||||
|
@ -431,7 +432,7 @@ try { //empieza el script
|
||||||
certificacio = info.certifications.DE
|
certificacio = info.certifications.DE
|
||||||
}
|
}
|
||||||
if (certificacio!=null) {
|
if (certificacio!=null) {
|
||||||
def familyCert = ['A', 'PG.7', 'G', 'APTA', 'TP']
|
def familyCert = ['A', 'G', 'APTA', 'TP']
|
||||||
if (familyCert.contains(certificacio))
|
if (familyCert.contains(certificacio))
|
||||||
infantil=true
|
infantil=true
|
||||||
}
|
}
|
||||||
|
@ -469,7 +470,7 @@ try { //empieza el script
|
||||||
//asiaticas
|
//asiaticas
|
||||||
def asiatica = false
|
def asiatica = false
|
||||||
if (info.ProductionCountries.size()>0) {
|
if (info.ProductionCountries.size()>0) {
|
||||||
def paisesAsiaticos = ["CN", "HK", "JP", "KP", "KR", "TH", "NP", "TW", "PH"]
|
def paisesAsiaticos = ["CN", "HK", "JP", "KP", "KR", "TH", "NP", "TW", "PH", "MO"]
|
||||||
def matchP = paisesAsiaticos.intersect(info.ProductionCountries)
|
def matchP = paisesAsiaticos.intersect(info.ProductionCountries)
|
||||||
if (matchP.size()==info.ProductionCountries.size()) asiatica=true
|
if (matchP.size()==info.ProductionCountries.size()) asiatica=true
|
||||||
}
|
}
|
||||||
|
@ -477,12 +478,12 @@ try { //empieza el script
|
||||||
//tria
|
//tria
|
||||||
if (tenimCat) ruta = ruta_cat
|
if (tenimCat) ruta = ruta_cat
|
||||||
else if (esDocu) ruta = ruta_docu
|
else if (esDocu) ruta = ruta_docu
|
||||||
else if (espanyola) ruta = ruta_esp
|
|
||||||
else if (semiEsp) ruta = ruta_semiesp
|
|
||||||
else if (esAnime) ruta = ruta_anime
|
else if (esAnime) ruta = ruta_anime
|
||||||
else if (infantil) ruta = ruta_infantil
|
else if (infantil) ruta = ruta_infantil
|
||||||
else if (esAnimacion) ruta = ruta_animacion
|
else if (esAnimacion) ruta = ruta_animacion
|
||||||
else if (asiatica) ruta = ruta_asiaticas
|
else if (asiatica) ruta = ruta_asiaticas
|
||||||
|
else if (espanyola) ruta = ruta_esp
|
||||||
|
else if (semiEsp) ruta = ruta_semiesp
|
||||||
else if (y<1980) ruta = ruta_classic
|
else if (y<1980) ruta = ruta_classic
|
||||||
else if (y<2000) ruta = ruta_retro
|
else if (y<2000) ruta = ruta_retro
|
||||||
if (ruta==rutaOK && y>=2021) ruta = ruta_estrenos
|
if (ruta==rutaOK && y>=2021) ruta = ruta_estrenos
|
||||||
|
@ -512,11 +513,11 @@ try { //empieza el script
|
||||||
return resultado
|
return resultado
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
/*
|
|
||||||
String str= err.getStackTrace().toString()
|
String str= err.getStackTrace().toString()
|
||||||
def pattern = ( str =~ /groovy.(\d+)./ )
|
def pattern = ( str =~ /groovy.(\d+)./ )
|
||||||
return " Error at line number = " + pattern[0][1] + ". more: "+str
|
return " Error at line number = " + pattern[0][1] + ". more: "+str
|
||||||
*/
|
|
||||||
def rutaMotivoErr
|
def rutaMotivoErr
|
||||||
def msgErr = err.getMessage()
|
def msgErr = err.getMessage()
|
||||||
if (msgErr=="[formato_fichero_noestarndar]" || msgErr=="[video_roto]")
|
if (msgErr=="[formato_fichero_noestarndar]" || msgErr=="[video_roto]")
|
||||||
|
|
|
@ -117,6 +117,11 @@ try { //empieza el script
|
||||||
media
|
media
|
||||||
} catch (err) {throw new Exception("[no_media]")}
|
} catch (err) {throw new Exception("[no_media]")}
|
||||||
|
|
||||||
|
def theAudio
|
||||||
|
try{
|
||||||
|
theAudio = audio
|
||||||
|
} catch (err) {/*throw new Exception("[no_audio]")*/}
|
||||||
|
|
||||||
/** Audio (ejecución) **/
|
/** Audio (ejecución) **/
|
||||||
def catalanAudios=[]
|
def catalanAudios=[]
|
||||||
def spanishAudios=[]
|
def spanishAudios=[]
|
||||||
|
@ -124,6 +129,7 @@ try { //empieza el script
|
||||||
def otherAudios=[]
|
def otherAudios=[]
|
||||||
def audioDeclUndefined=false
|
def audioDeclUndefined=false
|
||||||
def audiosFantasma=''
|
def audiosFantasma=''
|
||||||
|
if (theAudio != null)
|
||||||
for (item in audio) {
|
for (item in audio) {
|
||||||
def idioma
|
def idioma
|
||||||
try {
|
try {
|
||||||
|
@ -169,7 +175,7 @@ try { //empieza el script
|
||||||
throw new Exception("[idioma_audio_solo_ingles]")
|
throw new Exception("[idioma_audio_solo_ingles]")
|
||||||
} else if (!otherAudios.isEmpty()) { //tenemos español
|
} else if (!otherAudios.isEmpty()) { //tenemos español
|
||||||
throw new Exception("[idioma_audio_marginal]")
|
throw new Exception("[idioma_audio_marginal]")
|
||||||
} else {
|
} else if (!ignorarAudioNoDef) {
|
||||||
throw new Exception("[idioma_audio_no_encontrado]")
|
throw new Exception("[idioma_audio_no_encontrado]")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -178,8 +184,8 @@ try { //empieza el script
|
||||||
/***********/
|
/***********/
|
||||||
|
|
||||||
/** Codec Vídeo: en carpeta y en nombre fichero **/
|
/** Codec Vídeo: en carpeta y en nombre fichero **/
|
||||||
def codecVideo = (any{vc}{0} =~ /HEVC|265|ATEME/ ) ? 'HEVC' :
|
def codecVideo = (vcf =~ /HEVC|265|ATEME/ ) ? 'HEVC' :
|
||||||
(any{vc}{0} =~ /264/) ? 'AVC' : vc
|
(vcf =~ /264/) ? 'AVC' : vcf
|
||||||
/**************/
|
/**************/
|
||||||
|
|
||||||
/** Formato distribución **/
|
/** Formato distribución **/
|
||||||
|
@ -224,15 +230,16 @@ try { //empieza el script
|
||||||
|
|
||||||
/**** Profundidad vídeo ****/
|
/**** Profundidad vídeo ****/
|
||||||
def myBitrate = 'noBRdef'
|
def myBitrate = 'noBRdef'
|
||||||
try{ myBitrate = (mbps.round(1)+"Mbps").replace(/.0/,'') }catch(err){}
|
try{ myBitrate = (mbps).replace(/.0/,'') }catch(err){}
|
||||||
//if (bitrate >= 10000000) throw new Exception("[bitrate_demasiado_alto]")
|
//if (bitrate >= 10000000) throw new Exception("[bitrate_demasiado_alto]")
|
||||||
def infoBitrate = mbps < 11 ? myBitrate
|
def numericBR = mbps.toString().before(' ').toDouble()
|
||||||
: mbps < 15 ? myBitrate+' (BITRATE_S)'
|
def infoBitrate = numericBR < 11 ? myBitrate
|
||||||
: mbps < 20 ? myBitrate+' (BITRATE_M)'
|
: numericBR < 15 ? myBitrate+' (BITRATE_S)'
|
||||||
: mbps < 25 ? myBitrate+' (BITRATE_L)'
|
: numericBR < 20 ? myBitrate+' (BITRATE_M)'
|
||||||
|
: numericBR < 25 ? myBitrate+' (BITRATE_L)'
|
||||||
: myBitrate+' (BITRATE_XL)'
|
: myBitrate+' (BITRATE_XL)'
|
||||||
def myFps = ' FRvar'
|
def myFps = ' FRvar'
|
||||||
try { myFps = ' '+(fps.round(1)+"fps").replace(/.0/,'') }catch(err){}
|
try { myFps = ' '+fps.replace(/.0/,'') }catch(err){}
|
||||||
/************ ***************/
|
/************ ***************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -310,12 +317,12 @@ try { //empieza el script
|
||||||
|
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
//throw err
|
||||||
|
|
||||||
/*
|
|
||||||
String str= err.getStackTrace().toString()
|
String str= err.getStackTrace().toString()
|
||||||
def pattern = ( str =~ /groovy.(\d+)./ )
|
def pattern = ( str =~ /groovy.(\d+)./ )
|
||||||
return " Error at line number = " + pattern[0][1]
|
return " Error at line number = " + pattern[0][1]
|
||||||
*/
|
|
||||||
|
|
||||||
def rutaMotivoErr
|
def rutaMotivoErr
|
||||||
def msgErr = err.getMessage()
|
def msgErr = err.getMessage()
|
||||||
|
|
Loading…
Reference in New Issue