def prodCountries=info.ProductionCountries
def numPaises = prodCountries.size()
def llengu = {try {def langs=[]; for (lan in languages) langs.add(lan.toString()); return langs } catch(err) {[]}}()
def certifications=info.Certifications
def pais = {try{country} catch (err) {null}}()


def catalana = false
def espanyola = false
if (numPaises>0 ? prodCountries.contains("ES") : true) {
	catalana = llengu.contains('cat')
	if (!catalana) {
		espanyola =
				(numPaises==1 || (numPaises==2 && prodCountries.any{ it=~/AR|PT/ }))
			||	{ try { info.Network =~ /(?i)\bFLIXOL.\b|\b.?TVE\b/ } catch (e) { false } }()
			||	{ try { info.ProductionCompanies.any{it =~ /.?TVE|ESDIP|Canal Sur|Canal\+|Telecinco/}}catch(e){false}}()
			||	(certifications.size()==1 && certifications.ES!=null) 
			||	(llengu.size()==1 && llengu[0]=="spa")
			||	(movie.alternativeTitles.size()==1 && movie.alternativeTitles.ES!=null)
	}
}


res =espanyola

return res