<%
missing_languages = ast.literal_eval(row[3])
if missing_languages is not None:
from get_subtitle import search_active
from config import settings
for language in missing_languages:
if language.endswith(':forced'):
forced = True
else:
forced = False
end
if row[9] is not None and settings.general.getboolean('adaptive_searching') and language in row[9]:
for lang in ast.literal_eval(row[9]):
if language in lang:
active = search_active(lang[1])
if active:
%>
{{language}}
%else:
{{language}}
%end
%end
%end
%else:
{{language}}
%end
%end
%end