Skip to content

Commit

Permalink
Testing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Aug 30, 2024
1 parent 1a42639 commit bdf464a
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -4482,22 +4482,26 @@ def custom_format_unmet_check(self, torrent: qbittorrentapi.TorrentDictionary) -
return False
elif self.type == "radarr":
self.logger.debug("custom_format_unmet_check: [queue:%s]", queue["records"])
entry = list(
filter(lambda x: x["downloadId"] == torrent.hash, queue["records"])
entry = dict(
filter(
lambda x: x.get("downloadId", None) == torrent.hash, queue["records"]
)
)
# entry = next(
# (
# record["movieId"]
# for record in queue["records"]
# if record["downloadId"] == torrent.hash
# ),
# None,
# )
self.logger.debug("custom_format_unmet_check: [entry:%s]", entry)
if not len(entry) > 0:
entry2 = next(
(
record
for record in queue["records"]
if record["downloadId"] == torrent.hash
),
None,
)
self.logger.debug(
"custom_format_unmet_check: [entry:%s][entry2:%s]", entry, entry2
)
if not entry:
return False
else:
entry = entry[0]["movieId"]
# else:
# entry = entry["movieId"]
customFormat = list(
filter(lambda x: x["downloadId"] == torrent.hash, queue["records"])
)[0]["customFormatScore"]
Expand Down

0 comments on commit bdf464a

Please sign in to comment.