Subtitles Path |
Language(s) |
|
<%
subtitles_files = ast.literal_eval(str(details['subtitles']))
subtitles_files.sort(key=lambda x: x[0])
if subtitles_files is not None:
for subtitles_file in subtitles_files:
if subtitles_file[0].endswith(':forced'):
forced = True
else:
forced = False
end
%>
%if subtitles_file[1] is not None:
{{path.basename(path_replace_movie(subtitles_file[1]))}} |
%else:
Video File Subtitles Track |
%end
{{language_from_alpha2(subtitles_file[0].split(':')[0])}}{{' forced' if forced else ''}} |
%if subtitles_file[1] is not None:
%end
|
<%
end
if len(subtitles_files) == 0:
%>
No Subtitles Detected For This Movie. |
<%
end
end
%>
<%
if details['missing_subtitles'] is not None:
missing_subs_languages = ast.literal_eval(details['missing_subtitles'])
else:
missing_subs_languages = []
end
from get_subtitle import search_active
if missing_subs_languages is not None:
%>
<%
for missing_subs_language in missing_subs_languages:
if len(missing_subs_language) > 2:
forced = missing_subs_language[2]
forced_bool = True
else:
forced = False
forced_bool = False
end
if details['failedAttempts'] is not None and settings.general.getboolean('adaptive_searching') and missing_subs_language in details['failedAttempts']:
for lang in ast.literal_eval(details['failedAttempts']):
if missing_subs_language in lang:
if search_active(lang[1]):
%>
{{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}}
%else:
{{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}}
<%
end
end
end
else:
%>
{{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}}
<%
end
end
end
%>