Skip to content

Commit

Permalink
[minor] A bunch of release changes and logic update for FreeSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed May 8, 2024
1 parent 220a00e commit 0db7f85
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions qBitrr/arss.py
Expand Up @@ -4878,24 +4878,6 @@ def _process_single_torrent_pause_disk_space(self, torrent: qbittorrentapi.Torre
)
self.pause.add(torrent.hash)

def _process_single_torrent_resume_disk_space(self, torrent: qbittorrentapi.TorrentDictionary):
self.logger.info(
"Resuming torrent for disk space: "
"[Progress: %s%%][Added On: %s]"
"[Availability: %s%%][Time Left: %s]"
"[Last active: %s] "
"| [%s] | %s (%s)",
round(torrent.progress * 100, 2),
datetime.fromtimestamp(torrent.added_on),
round(torrent.availability * 100, 2),
timedelta(seconds=torrent.eta),
datetime.fromtimestamp(torrent.last_activity),
torrent.state_enum,
torrent.name,
torrent.hash,
)
self.resume.add(torrent.hash)

def _process_single_torrent(self, torrent):
if self.is_downloading_state(torrent):
free_space_test = self.current_free_space
Expand All @@ -4916,7 +4898,6 @@ 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"])
self._process_single_torrent_resume_disk_space(torrent)
elif self.is_complete_state(torrent) and "qBitrr-free_space_paused" in torrent.tags:
self.logger.trace(
"Removing tag[%s] for completed torrent[%s]: Free space %s",
Expand All @@ -4928,7 +4909,6 @@ def _process_single_torrent(self, torrent):

def process(self):
self._process_paused()
self._process_resume()

def process_torrents(self):
try:
Expand Down

0 comments on commit 0db7f85

Please sign in to comment.