diff --git a/qBitrr/arss.py b/qBitrr/arss.py index 5e4146ab..6ff1ab6d 100755 --- a/qBitrr/arss.py +++ b/qBitrr/arss.py @@ -1293,8 +1293,9 @@ def db_get_files_movies( if not self.search_missing: yield None, False, False if self.type == "radarr": + condition = self.model_file.Year.is_null(False) if self.search_by_year: - condition = self.model_file.Year == self.search_current_year + condition &= self.model_file.Year == self.search_current_year if not self.do_upgrade_search: if self.quality_unmet_search: condition &= self.model_file.QualityMet == False @@ -1304,11 +1305,10 @@ def db_get_files_movies( else: if not self.do_upgrade_search: if self.quality_unmet_search: - condition = self.model_file.QualityMet == False + condition &= self.model_file.QualityMet == False else: - condition = self.model_file.MovieFileId == 0 + condition &= self.model_file.MovieFileId == 0 condition &= self.model_file.Searched == False - condition = self.model_file.Year.is_null(False) for entry in ( self.model_file.select() .where(condition)