Skip to content

Commit

Permalink
[patch] Free Space logic adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed May 16, 2024
1 parent a12bbd3 commit 37f1465
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -4899,7 +4899,7 @@ def _process_single_torrent(self, torrent):
self.current_free_space = free_space_test
self.logger.trace("Can download: Free space %s", self.current_free_space)
torrent.remove_tags(tags=["qBitrr-free_space_paused"])
elif self.is_complete_state(torrent) and "qBitrr-free_space_paused" in torrent.tags:
elif not self.is_downloading_state(torrent) and "qBitrr-free_space_paused" in torrent.tags:
self.logger.trace(
"Removing tag[%s] for completed torrent[%s]: Free space %s",
"qBitrr-free_space_paused",
Expand Down Expand Up @@ -4937,14 +4937,6 @@ def process_torrents(self):
self.current_free_space = shutil.disk_usage(
self.completed_folder
).free - parse_size(self.min_free_space)
self.logger.trace(
"Current free space (pre parse): %s",
shutil.disk_usage(self.completed_folder).free,
)
self.logger.trace(
"Free space to hold: %s",
parse_size(self.min_free_space),
)
self.logger.trace("Current free space: %s", self.current_free_space)
sorted_torrents = sorted(torrents, key=lambda t: t["priority"])
for torrent in sorted_torrents:
Expand Down

0 comments on commit 37f1465

Please sign in to comment.