From a4684feaba914b6957135d08cdef68808f209380 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 25 Mar 2021 14:43:06 -0400 Subject: [PATCH] Fixed get_exclusion_clause that do not have the required column due to a missing join. --- bazarr/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr/api.py b/bazarr/api.py index 9daff3774..0c4d9691f 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -1468,8 +1468,10 @@ class EpisodesWanted(Resource): for item in data: postprocessEpisode(item) - count = database.execute("SELECT COUNT(*) as count FROM table_episodes WHERE missing_subtitles != '[]'" + - get_exclusion_clause('series'), only_one=True)['count'] + count = database.execute("SELECT COUNT(*) as count, table_shows.tags, table_shows.seriesType FROM " + "table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = " + "table_episodes.sonarrSeriesId WHERE missing_subtitles != '[]'" + + get_exclusion_clause('series'), only_one=True)['count'] return jsonify(data=data, total=count)