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