//animacion (no concluyente)
def tieneAnimacion = genres.any{ it =~ /Anima.i.n/}
//familiar (no conclud)
def tieneFamiliar = genres.any{ it =~ /Familia|Family/}

//***** familiar vs infantil ****
def esFamiliar = tieneFamiliar
def	infantil = false

def tieneCertificacion = info.Certifications!=null && info.Certifications.size()!=0

if (tieneFamiliar && tieneAnimacion) {
    def noTanInfantil = info.Certifications.US ==~/PG-13/ && info.Certifications.ES==~/7/
    if (!noTanInfantil) infantil = true
}
else if (tieneAnimacion) {
    if (tieneCertificacion) {
            infantil = info.Certifications.US=="G"
                || info.Certifications.ES=~/Ai|APTA/
                || info.Certifications.DE==~/0/
                || info.Certifications.IT=="T" 
                || info.Certifications.IE=="G" 
                || info.Certifications.LT=="V" || info.Certifications.RU ==~ /6.+/
                || info.Certifications.BR=="L"
    } else {
        return 'Bonnie bears'.toLowerCase() + ' - ' + localize.English.n.toLowerCase() + ' - result: '+localize.English.n.toLowerCase().contains('Bonnie bears')

        def titulosInfantiles = ['Boonie bears', 'The Jungle Bunch']
        if (titulosInfantiles.any { localize.English.n.toLowerCase().contains(it.toLowerCase()) })
            infantil = true
    }
} else if (!esFamiliar) {
    if (tieneCertificacion && (
            info.Certifications.US=="G"
        )) {
        esFamiliar = true //posem a familiar pelis de nens que no son animacio
    }
}

def res = 'result: '+infantil + '. '+info.certifications + ' - ' + genres

