Skip to content

Commit

Permalink
[build] More debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Oct 30, 2023
1 parent d864586 commit fa43e4a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1961,13 +1961,20 @@ def db_update_single_series(
requests.exceptions.ConnectionError,
):
completed = True
episode_count = seriesMetadata.get("episodeCount", -2)
searched = episode_count == seriesMetadata.get("episodeFileCount", -1)
statistics = seriesMetadata.get("statistics")
self.logger.debug("statistics: %s", statistics)
episode_count = statistics.get("episodeCount")
self.logger.debug("episode_count: %s", episode_count)
searched = episode_count == statistics.get("episodeFileCount")
self.logger.debug("searched: %s", searched)
if episode_count == 0:
searched = True
Title = seriesMetadata.get("title")
Monitored = db_entry.Monitored
self.logger.debug("Updating database entry | %s | %s", Title, searched)
self.logger.trace(
"Updating database entry | %s",
Title,
)
to_update = {
self.series_file_model.Monitored: Monitored,
self.series_file_model.Title: Title,
Expand Down Expand Up @@ -3738,7 +3745,6 @@ def run_search_loop(self) -> NoReturn:
if self.loop_completed:
years_index = 0
timer = datetime.now()
self.logger.debug("Loop completed: %s", self.loop_completed)
if self.search_by_year:
if years_index == 0:
years, years_count = self.get_year_search()
Expand Down Expand Up @@ -3769,10 +3775,7 @@ def run_search_loop(self) -> NoReturn:
self.refresh_download_queue()
self.force_grab()
raise RestartLoopException
else:
self.logger.debug("Timer not elapsed")
for entry, todays, limit_bypass, series_search in self.db_get_files():
self.logger.debug("Entry: %s", entry.Title)
while (
self.maybe_do_search(
entry,
Expand All @@ -3781,9 +3784,7 @@ def run_search_loop(self) -> NoReturn:
series_search=series_search,
)
) is False:
self.logger.debug("maybe_do_search running")
time.sleep(30)
self.logger.debug("maybe_do_search completed/skipped")
except RestartLoopException:
self.loop_completed = True
self.logger.info("Loop timer elapsed, restarting it.")
Expand Down

0 comments on commit fa43e4a

Please sign in to comment.