diff --git a/bazarr/api/episodes/wanted.py b/bazarr/api/episodes/wanted.py index 8f5a10fef..4a6ec3641 100644 --- a/bazarr/api/episodes/wanted.py +++ b/bazarr/api/episodes/wanted.py @@ -49,7 +49,7 @@ class EpisodesWanted(Resource): episodeid = args.get('episodeid[]') wanted_conditions = [(TableEpisodes.missing_subtitles.is_not(None)), - (TableEpisodes.missing_subtitles.is_not('[]'))] + (TableEpisodes.missing_subtitles.is_not('[]'))] if len(episodeid) > 0: wanted_conditions.append((TableEpisodes.sonarrEpisodeId in episodeid)) start = 0 diff --git a/bazarr/api/movies/wanted.py b/bazarr/api/movies/wanted.py index 58749f707..ba22cd725 100644 --- a/bazarr/api/movies/wanted.py +++ b/bazarr/api/movies/wanted.py @@ -45,7 +45,8 @@ class MoviesWanted(Resource): args = self.get_request_parser.parse_args() radarrid = args.get("radarrid[]") - wanted_conditions = [(TableMovies.missing_subtitles.is_not('[]'))] + wanted_conditions = [(TableMovies.missing_subtitles.is_not(None)), + (TableMovies.missing_subtitles.is_not('[]'))] if len(radarrid) > 0: wanted_conditions.append((TableMovies.radarrId.in_(radarrid))) start = 0 diff --git a/bazarr/api/series/series.py b/bazarr/api/series/series.py index 6b1dc8747..a9b73c451 100644 --- a/bazarr/api/series/series.py +++ b/bazarr/api/series/series.py @@ -73,7 +73,8 @@ class Series(Resource): .group_by(TableShows.sonarrSeriesId)\ .subquery() - episodes_missing_conditions = [(TableEpisodes.missing_subtitles.is_not('[]'))] + episodes_missing_conditions = [(TableEpisodes.missing_subtitles.is_not(None)), + (TableEpisodes.missing_subtitles.is_not('[]'))] episodes_missing_conditions += get_exclusion_clause('series') episodeMissingCount = select(TableShows.sonarrSeriesId, diff --git a/bazarr/subtitles/wanted/movies.py b/bazarr/subtitles/wanted/movies.py index acacf9d26..f8c76be54 100644 --- a/bazarr/subtitles/wanted/movies.py +++ b/bazarr/subtitles/wanted/movies.py @@ -96,7 +96,8 @@ def wanted_download_subtitles_movie(radarr_id): def wanted_search_missing_subtitles_movies(): - conditions = [(TableMovies.missing_subtitles.is_not('[]'))] + conditions = [(TableMovies.missing_subtitles.is_not(None)), + (TableMovies.missing_subtitles.is_not('[]'))] conditions += get_exclusion_clause('movie') movies = database.execute( select(TableMovies.radarrId, diff --git a/bazarr/subtitles/wanted/series.py b/bazarr/subtitles/wanted/series.py index e4a084aa2..b7116e6b3 100644 --- a/bazarr/subtitles/wanted/series.py +++ b/bazarr/subtitles/wanted/series.py @@ -101,7 +101,8 @@ def wanted_download_subtitles(sonarr_episode_id): def wanted_search_missing_subtitles_series(): - conditions = [(TableEpisodes.missing_subtitles.is_not('[]'))] + conditions = [(TableEpisodes.missing_subtitles.is_not(None)), + (TableEpisodes.missing_subtitles.is_not('[]'))] conditions += get_exclusion_clause('series') episodes = database.execute( select(TableEpisodes.sonarrSeriesId,