Fix for subtitles upgrading when a series doesn't have a desired language anymore.

pull/427/head
Louis Vézina 6 years ago
parent 710e5665ed
commit 07c37b8254

@ -815,6 +815,7 @@ def upgrade_subtitles():
if settings.general.getboolean('use_sonarr'): if settings.general.getboolean('use_sonarr'):
for i, episode in enumerate(episodes_to_upgrade, 1): for i, episode in enumerate(episodes_to_upgrade, 1):
if episode[9] != "None":
if episode[1] in ast.literal_eval(str(episode[9])): if episode[1] in ast.literal_eval(str(episode[9])):
notifications.write(msg='Upgrading series subtitles...', notifications.write(msg='Upgrading series subtitles...',
queue='upgrade_subtitle', item=i, length=count_episode_to_upgrade) queue='upgrade_subtitle', item=i, length=count_episode_to_upgrade)
@ -833,6 +834,7 @@ def upgrade_subtitles():
if settings.general.getboolean('use_radarr'): if settings.general.getboolean('use_radarr'):
for i, movie in enumerate(movies_to_upgrade, 1): for i, movie in enumerate(movies_to_upgrade, 1):
if movie[8] != "None":
if movie[1] in ast.literal_eval(str(movie[8])): if movie[1] in ast.literal_eval(str(movie[8])):
notifications.write(msg='Upgrading movie subtitles...', notifications.write(msg='Upgrading movie subtitles...',
queue='upgrade_subtitle', item=i, length=count_movie_to_upgrade) queue='upgrade_subtitle', item=i, length=count_movie_to_upgrade)

@ -87,6 +87,7 @@
<td> <td>
% upgradable_criteria = (row[5], row[2], row[8]) % upgradable_criteria = (row[5], row[2], row[8])
% if upgradable_criteria in upgradable_movies: % if upgradable_criteria in upgradable_movies:
% if row[6] != "None":
% if row[6] and row[7] and row[7] in ast.literal_eval(str(row[6])): % if row[6] and row[7] and row[7] in ast.literal_eval(str(row[6])):
<div class="ui inverted basic compact icon" data-tooltip="This subtitles is eligible to an upgrade." data-inverted="" data-position="top left"> <div class="ui inverted basic compact icon" data-tooltip="This subtitles is eligible to an upgrade." data-inverted="" data-position="top left">
<i class="ui green recycle icon upgrade"></i>{{row[3]}} <i class="ui green recycle icon upgrade"></i>{{row[3]}}
@ -94,6 +95,7 @@
% else: % else:
{{row[3]}} {{row[3]}}
% end % end
% end
% else: % else:
{{row[3]}} {{row[3]}}
%end %end

@ -102,6 +102,7 @@
<td> <td>
% upgradable_criteria = (row[7], row[4], row[10]) % upgradable_criteria = (row[7], row[4], row[10])
% if upgradable_criteria in upgradable_episodes: % if upgradable_criteria in upgradable_episodes:
% if row[8] != "None":
% if row[9] in ast.literal_eval(str(row[8])): % if row[9] in ast.literal_eval(str(row[8])):
<div class="ui inverted basic compact icon" data-tooltip="This subtitles is eligible to an upgrade." data-inverted="" data-position="top left"> <div class="ui inverted basic compact icon" data-tooltip="This subtitles is eligible to an upgrade." data-inverted="" data-position="top left">
<i class="ui green recycle icon upgrade"></i>{{row[5]}} <i class="ui green recycle icon upgrade"></i>{{row[5]}}
@ -109,6 +110,7 @@
% else: % else:
{{row[5]}} {{row[5]}}
% end % end
% end
% else: % else:
{{row[5]}} {{row[5]}}
%end %end

Loading…
Cancel
Save