1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-01-31 11:22:38 +00:00

Fix only_monitored for movies

This commit is contained in:
Halali 2019-01-10 18:14:25 +01:00
parent 006fcd2be9
commit 04edd01746

View file

@ -486,14 +486,19 @@ def wanted_search_missing_subtitles():
c = db.cursor() c = db.cursor()
if settings.sonarr.getboolean('only_monitored'): if settings.sonarr.getboolean('only_monitored'):
monitored_only_query_string = ' AND monitored = "True"' monitored_only_query_string_sonarr = ' AND monitored = "True"'
else: else:
monitored_only_query_string = "" monitored_only_query_string_sonarr = ""
c.execute("SELECT path_substitution(path) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string) if settings.radarr.getboolean('only_monitored'):
monitored_only_query_string_radarr = ' AND monitored = "True"'
else:
monitored_only_query_string_radarr = ""
c.execute("SELECT path_substitution(path) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string_sonarr)
episodes = c.fetchall() episodes = c.fetchall()
c.execute("SELECT path_substitution_movie(path) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string) c.execute("SELECT path_substitution_movie(path) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string_radarr)
movies = c.fetchall() movies = c.fetchall()
c.close() c.close()