From 30d357d7975a397e1d0a44b22a4535fc79bd501d Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 11 Oct 2007 03:47:40 +0000 Subject: [PATCH] save uploaded_memory every minute --- TODO | 5 ++--- src/interface.py | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 9a61b25d6..013f2e515 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,5 @@ for 0.5.6 - 1. save upload data intermidently for sake of ratio - 2. check on file size warnings "you do not have enough disk space blah blah" + 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. - 3. for the love of all that is pure and holy, figure out why speed limiter + 2. for the love of all that is pure and holy, figure out why speed limiter doesnt work anymore diff --git a/src/interface.py b/src/interface.py index 756dc0d8b..b4150eea0 100644 --- a/src/interface.py +++ b/src/interface.py @@ -160,6 +160,7 @@ class DelugeGTK: SetConsoleCtrlHandler(win_handler) self.dht_timer = 0 + self.memory_timer = 0 self.dht_skip = False def connect_signals(self): @@ -981,6 +982,11 @@ window, please enter your password")) self.update_interface = self.window.get_property("visible") and not \ self.is_minimized + #save uploaded memory every minute + self.memory_timer += 1 + if (self.memory_timer == 60): + self.manager.pre_quitting() + self.memory_timer = 0 # Handle the events self.manager.handle_events()