Fixed incomplete SQL queries. #1479

pull/1485/head
morpheus65535 3 years ago
parent 5f6b201a71
commit d5b898064d

@ -1516,7 +1516,7 @@ class MoviesHistory(Resource):
if int(upgradable_movie['score']) < 120: if int(upgradable_movie['score']) < 120:
upgradable_movies_not_perfect.append(upgradable_movie) upgradable_movies_not_perfect.append(upgradable_movie)
query_conditions = [(TableMovies is not None)] query_conditions = [(TableMovies.title is not None)]
if radarrid: if radarrid:
query_conditions.append((TableMovies.radarrId == radarrid)) query_conditions.append((TableMovies.radarrId == radarrid))
query_condition = reduce(operator.and_, query_conditions) query_condition = reduce(operator.and_, query_conditions)

@ -292,7 +292,7 @@ def episodeParser(episode):
if 'name' in item: if 'name' in item:
audio_language.append(item['name']) audio_language.append(item['name'])
else: 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 'mediaInfo' in episode['episodeFile']:
if 'videoCodec' in episode['episodeFile']['mediaInfo']: if 'videoCodec' in episode['episodeFile']['mediaInfo']:

Loading…
Cancel
Save