Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Jan 14, 2019
2 parents d936a43 + 94b9672 commit 9bcbd79
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bazarr/get_subtitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,19 @@ def wanted_search_missing_subtitles():
c = db.cursor()

if settings.sonarr.getboolean('only_monitored'):
monitored_only_query_string = ' AND monitored = "True"'
monitored_only_query_string_sonarr = ' AND monitored = "True"'
else:
monitored_only_query_string = ""
monitored_only_query_string_sonarr = ""

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)
c.execute("SELECT path_substitution(path) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string_sonarr)
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()

c.close()
Expand Down

0 comments on commit 9bcbd79

Please sign in to comment.