1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 01:27:07 +00:00

Fix for #1031. Still better improvement ;-)

This commit is contained in:
Louis Vézina 2020-07-23 21:20:14 -04:00
parent e47aed6490
commit d6ddf76b68
2 changed files with 6 additions and 6 deletions

View file

@ -405,7 +405,7 @@ class SeriesEditSave(Resource):
pass
else:
for seriesId in seriesIdList:
list_missing_subtitles(no=seriesId, update_wanted=False)
list_missing_subtitles(no=seriesId, send_event=False)
event_stream(type='series_editor', action='update')
event_stream(type='badges')
@ -930,7 +930,7 @@ class MoviesEditSave(Resource):
pass
else:
for radarrId in radarrIdList:
list_missing_subtitles_movies(no=radarrId, update_wanted=False)
list_missing_subtitles_movies(no=radarrId, send_event=False)
event_stream(type='movies_editor', action='update')
event_stream(type='badges')

View file

@ -169,7 +169,7 @@ def store_subtitles_movie(original_path, reversed_path):
return actual_subtitles
def list_missing_subtitles(no=None, epno=None, update_wanted=True):
def list_missing_subtitles(no=None, epno=None, send_event=True):
if no is not None:
episodes_subtitles_clause = " WHERE table_episodes.sonarrSeriesId=" + str(no)
elif epno is not None:
@ -231,13 +231,13 @@ def list_missing_subtitles(no=None, epno=None, update_wanted=True):
database.execute("UPDATE table_episodes SET missing_subtitles=? WHERE sonarrEpisodeId=?",
(missing_subtitles_item[0], missing_subtitles_item[1]))
if send_event:
event_stream(type='episode', action='update', series=missing_subtitles_item[2],
episode=missing_subtitles_item[1])
if update_wanted:
event_stream(type='badges')
def list_missing_subtitles_movies(no=None, update_wanted=True):
def list_missing_subtitles_movies(no=None, send_event=True):
if no is not None:
movies_subtitles_clause = " WHERE radarrId=" + str(no)
else:
@ -293,8 +293,8 @@ def list_missing_subtitles_movies(no=None, update_wanted=True):
database.execute("UPDATE table_movies SET missing_subtitles=? WHERE radarrId=?",
(missing_subtitles_item[0], missing_subtitles_item[1]))
if send_event:
event_stream(type='movie', action='update', movie=missing_subtitles_item[1])
if update_wanted:
event_stream(type='badges')