Skip to content

Commit

Permalink
[build] Deletion logic change
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Sep 20, 2023
1 parent 46f4856 commit a8e823c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,9 +1425,7 @@ def db_update(self):
if self.type == "sonarr":
if not self.series_search:
self.model_arr_file: EpisodesModel
Ids = [
id for id in self.model_arr_file.select(self.model_arr_file.Id).execute()
]
Ids = list(self.model_arr_file.select(self.model_arr_file.Id).execute())
self.model_file.delete().where(self.model_file.EntryId.not_in(Ids)).execute()
_series = set()
if self.search_by_year:
Expand Down Expand Up @@ -1474,7 +1472,9 @@ def db_update(self):
self.db_update_single_series(db_entry=series)
else:
self.model_arr_series_file: SeriesModel
Ids = [id for id in self.model_arr_series_file.select().execute()]
Ids = list(
self.model_arr_series_file.select(self.model_arr_series_file.Id).execute()
)
self.series_file_model.delete().where(
self.series_file_model.EntryId.not_in(Ids)
).execute()
Expand All @@ -1489,7 +1489,7 @@ def db_update(self):
self.model_arr_file: MoviesModel
elif self.version == "5":
self.model_arr_file: MoviesModelv5
Ids = [id for id in self.model_arr_file.select(self.model_arr_file.Id).execute()]
Ids = list(self.model_arr_file.select(self.model_arr_file.Id).execute())
self.model_file.delete().where(self.model_file.EntryId.not_in(Ids)).execute()
if self.search_by_year:
for movies in (
Expand Down

0 comments on commit a8e823c

Please sign in to comment.