<%
missing_languages = ast.literal_eval(row['missing_subtitles'])
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['failedAttempts'] is not None and settings.general.getboolean('adaptive_searching') and language in row['failedAttempts']:
for lang in ast.literal_eval(row['failedAttempts']):
if language in lang:
active = search_active(lang[1])
if active:
%>
{{language}}
%else:
{{language}}
%end
%end
%end
%else:
{{language}}
%end
%end
%end