Skip to content

Commit

Permalink
[patch] Fixed JSONDecode Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Jan 9, 2024
1 parent 96e7386 commit 13fcaba
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -2639,9 +2639,18 @@ def process_entries(self, hashes: set[str]) -> tuple[list[tuple[int, str]], set[
def process_torrents(self):
try:
try:
torrents = self.manager.qbit_manager.client.torrents.info(
status_filter="all", category=self.category, sort="added_on", reverse=False
)
completed = True
while completed:
try:
completed = False
torrents = self.manager.qbit_manager.client.torrents.info(
status_filter="all",
category=self.category,
sort="added_on",
reverse=False,
)
except JSONDecodeError:
completed = True
torrents = [t for t in torrents if hasattr(t, "category")]
if not len(torrents):
raise DelayLoopException(length=5, type="no_downloads")
Expand Down

0 comments on commit 13fcaba

Please sign in to comment.