From e4f5d822dedc35637fdd6533dc4389a05218688e Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 14 Oct 2007 04:46:11 +0000 Subject: [PATCH] use total_wanted instead of total_size in checking free space --- TODO | 6 +----- src/core.py | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index f25e6b71f..8b3ed6610 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,2 @@ for 0.5.6 - 1. check on file size warnings "you do not have enough disk space blah blah" - and see how it works with the new sparse mode. use total_wanted. - 2. for the love of all that is pure and holy, figure out why speed limiter - doesnt work anymore - 3. make scheduled plugin work without having to open up its preferences first + 1. make scheduled plugin work without having to open up its preferences first diff --git a/src/core.py b/src/core.py index b9d0d0c78..ed55ffbb4 100644 --- a/src/core.py +++ b/src/core.py @@ -542,7 +542,7 @@ class Manager: if self.unique_IDs[unique_ID].compact == False: avail = self.calc_free_space(directory = self.unique_IDs\ [unique_ID].save_dir) - total_needed = torrent_state["total_size"] - torrent_state["total_done"] + total_needed = torrent_state["total_wanted"] - torrent_state["total_done"] if total_needed < avail: # We have enough free space, so lets resume this torrent self.resume(unique_ID)