Skip to content

Commit

Permalink
Change searched update
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Dec 10, 2024
1 parent 6f886ac commit 0029967
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,10 @@ def db_get_files_movies(self) -> list[list[MoviesFilesModel, bool, bool]] | None
return None
if self.type == "radarr":
condition = self.model_file.Year.is_null(False)
# if self.do_upgrade_search:
# self.logger.trace("Condition 1")
# condition &= self.model_file.Upgrade == False
if not self.do_upgrade_search:
if self.do_upgrade_search:
self.logger.trace("Condition 1")
condition &= self.model_file.Upgrade == False
else:
if self.quality_unmet_search and not self.custom_format_unmet_search:
self.logger.trace("Condition 2")
condition &= (
Expand Down Expand Up @@ -2903,7 +2903,7 @@ def remove_and_maybe_blocklist(self, downloads_id: str | None, file_or_folder: p
"manually removing it | %s",
file_or_folder,
)
except PermissionError:
except (PermissionError, OSError):
self.logger.debug(
"Folder in use: Failed to remove Folder: Folder was marked as failed by Ar "
"| %s",
Expand All @@ -2917,7 +2917,7 @@ def remove_and_maybe_blocklist(self, downloads_id: str | None, file_or_folder: p
"manually removing it | %s",
file_or_folder,
)
except PermissionError:
except (PermissionError, OSError):
self.logger.debug(
"File in use: Failed to remove file: File was marked as failed by Ar | %s",
file_or_folder,
Expand Down Expand Up @@ -2986,7 +2986,7 @@ def maybe_do_search(
file_model.EntryId,
file_model.AirDateUtc,
)
file_model.update(Searched=True, Upgrade=True).where(
self.model_file.update(Searched=True, Upgrade=True).where(
file_model.EntryId == file_model.EntryId
).execute()
return True
Expand Down Expand Up @@ -3030,7 +3030,7 @@ def maybe_do_search(
JSONDecodeError,
):
continue
file_model.update(Searched=True, Upgrade=True).where(
self.model_file.update(Searched=True, Upgrade=True).where(
file_model.EntryId == file_model.EntryId
).execute()
if file_model.Reason:
Expand Down Expand Up @@ -3092,7 +3092,7 @@ def maybe_do_search(
JSONDecodeError,
):
continue
file_model.update(Searched=True, Upgrade=True).where(
self.model_file.update(Searched=True, Upgrade=True).where(
file_model.EntryId == file_model.EntryId
).execute()
self.logger.hnotice(
Expand Down Expand Up @@ -3122,7 +3122,7 @@ def maybe_do_search(
file_model.Title,
file_model.EntryId,
)
file_model.update(Searched=True, Upgrade=True).where(
self.model_file.update(Searched=True, Upgrade=True).where(
file_model.EntryId == file_model.EntryId
).execute()
return True
Expand Down Expand Up @@ -3153,7 +3153,7 @@ def maybe_do_search(
JSONDecodeError,
):
continue
file_model.update(Searched=True, Upgrade=True).where(
self.model_file.update(Searched=True, Upgrade=True).where(
file_model.EntryId == file_model.EntryId
).execute()
if file_model.Reason:
Expand Down

0 comments on commit 0029967

Please sign in to comment.