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