mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-18 14:26:24 +00:00
Fix for moving progress with no data downloaded
This commit is contained in:
parent
21f18a75bb
commit
713e264061
@ -883,9 +883,13 @@ class Torrent(object):
|
|||||||
progress = 100.0
|
progress = 100.0
|
||||||
elif self.moving_storage:
|
elif self.moving_storage:
|
||||||
torrent_status = self.get_status(["files", "total_done"])
|
torrent_status = self.get_status(["files", "total_done"])
|
||||||
torrent_files = [f['path'] for f in torrent_status["files"]]
|
# Check if torrent has downloaded any data yet.
|
||||||
dest_path_size = get_size(torrent_files, self.moving_storage_dest_path)
|
if torrent_status["total_done"]:
|
||||||
progress = dest_path_size / torrent_status["total_done"] * 100
|
torrent_files = [f['path'] for f in torrent_status["files"]]
|
||||||
|
dest_path_size = get_size(torrent_files, self.moving_storage_dest_path)
|
||||||
|
progress = dest_path_size / torrent_status["total_done"] * 100
|
||||||
|
else:
|
||||||
|
progress = 100.0
|
||||||
else:
|
else:
|
||||||
progress = self.status.progress * 100
|
progress = self.status.progress * 100
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user