From 4718546c44b7e96db30fbaf2f4066c3849ef264b Mon Sep 17 00:00:00 2001 From: Feramance Date: Fri, 28 Jun 2024 11:41:57 +0200 Subject: [PATCH] Variable type fix --- qBitrr/arss.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/qBitrr/arss.py b/qBitrr/arss.py index 8398d6f5..2aaecdab 100755 --- a/qBitrr/arss.py +++ b/qBitrr/arss.py @@ -3971,9 +3971,13 @@ def _process_single_torrent(self, torrent: qbittorrentapi.TorrentDictionary): maximum_eta = _tracker_max_eta stalled_ignore = False - if torrent.state_enum in ( - TorrentStates.METADATA_DOWNLOAD, - TorrentStates.STALLED_DOWNLOAD, + if ( + torrent.state_enum + in ( + TorrentStates.METADATA_DOWNLOAD, + TorrentStates.STALLED_DOWNLOAD, + ) + or torrent.availability < 1 ): if self.allowed_stalled: self.logger.trace( @@ -3983,8 +3987,10 @@ def _process_single_torrent(self, torrent: qbittorrentapi.TorrentDictionary): torrent.added_on, time.time() + timedelta(minutes=self.stalled_delay), ) - if self.stalled_delay > 0 and torrent.added_on >= time.time() + timedelta( - minutes=self.stalled_delay + if ( + self.stalled_delay > 0 + and torrent.added_on + >= time.time() + timedelta(minutes=self.stalled_delay).seconds ): stalled_ignore = False elif "qBitrr-allowed_stalled" not in torrent.tags: