Error 500 in episode list

pull/26/head
Louis Vézina 7 years ago
parent a83e3d4f65
commit 31a14eea7c

@ -1,4 +1,4 @@
FROM lsiobase/alpine.python
FROM python:2
EXPOSE 6767

@ -120,4 +120,7 @@ def add_new_episodes():
# Store substitles from episodes we've just added
new_scan_subtitles()
list_missing_subtitles()
try:
list_missing_subtitles()
except:
pass

@ -155,36 +155,43 @@
%if episode[4] is not None:
% actual_languages = ast.literal_eval(episode[4])
%else:
actual_languages = '[]'
% actual_languages = '[]'
%end
%if actual_languages is not None:
%try:
%for language in actual_languages:
%if language[1] is not None:
<a data-episodePath="{{episode[1]}}" data-subtitlesPath="{{path_replace(language[1])}}" data-language="{{pycountry.languages.lookup(str(language[0])).alpha_3}}" data-sonarrSeriesId={{episode[5]}} data-sonarrEpisodeId={{episode[7]}} class="remove_subtitles ui tiny label">
{{language[0]}}
<i class="delete icon"></i>
</a>
%else:
<div class="ui tiny label">
{{language[0]}}
</div>
%end
%if language[1] is not None:
<a data-episodePath="{{episode[1]}}" data-subtitlesPath="{{path_replace(language[1])}}" data-language="{{pycountry.languages.lookup(str(language[0])).alpha_3}}" data-sonarrSeriesId={{episode[5]}} data-sonarrEpisodeId={{episode[7]}} class="remove_subtitles ui tiny label">
{{language[0]}}
<i class="delete icon"></i>
</a>
%else:
<div class="ui tiny label">
{{language[0]}}
</div>
%end
%end
%except:
%pass
%end
</td>
<td>
%if episode[6] is not None:
% missing_languages = ast.literal_eval(episode[6])
%else:
% missing_languages = None
%end
%if missing_languages is not None:
%for language in missing_languages:
<a data-episodePath="{{episode[1]}}" data-language="{{pycountry.languages.lookup(str(language)).alpha_3}}" data-hi="{{details[4]}}" data-sonarrSeriesId={{episode[5]}} data-sonarrEpisodeId={{episode[7]}} class="get_subtitle ui tiny label">
{{language}}
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
</a>
%try:
%if episode[6] is not None:
% missing_languages = ast.literal_eval(episode[6])
%else:
% missing_languages = None
%end
%if missing_languages is not None:
%for language in missing_languages:
<a data-episodePath="{{episode[1]}}" data-language="{{pycountry.languages.lookup(str(language)).alpha_3}}" data-hi="{{details[4]}}" data-sonarrSeriesId={{episode[5]}} data-sonarrEpisodeId={{episode[7]}} class="get_subtitle ui tiny label">
{{language}}
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
</a>
%end
%end
%except:
%pass
%end
</td>
</tr>

Loading…
Cancel
Save