From d5b898064d7188d5bc47bcb3a73405a38133d5d6 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 22 Jul 2021 07:37:55 -0400 Subject: [PATCH] Fixed incomplete SQL queries. #1479 --- bazarr/api.py | 2 +- bazarr/get_episodes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/api.py b/bazarr/api.py index e4d622234..1f8494c6c 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -1516,7 +1516,7 @@ class MoviesHistory(Resource): if int(upgradable_movie['score']) < 120: upgradable_movies_not_perfect.append(upgradable_movie) - query_conditions = [(TableMovies is not None)] + query_conditions = [(TableMovies.title is not None)] if radarrid: query_conditions.append((TableMovies.radarrId == radarrid)) query_condition = reduce(operator.and_, query_conditions) diff --git a/bazarr/get_episodes.py b/bazarr/get_episodes.py index 4c1332882..55d436f46 100644 --- a/bazarr/get_episodes.py +++ b/bazarr/get_episodes.py @@ -292,7 +292,7 @@ def episodeParser(episode): if 'name' in item: audio_language.append(item['name']) else: - audio_language = TableShows.get(TableShows == episode['seriesId']).audio_language + audio_language = TableShows.get(TableShows.sonarrSeriesId == episode['seriesId']).audio_language if 'mediaInfo' in episode['episodeFile']: if 'videoCodec' in episode['episodeFile']['mediaInfo']: