From 27bc2a72b0540b8edd11540af6be477cefe3f55e Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sat, 1 Dec 2007 06:45:43 +0000 Subject: [PATCH] tweak full hd warning - disable it in libtorrent --- ChangeLog | 4 +++- libtorrent/src/peer_connection.cpp | 6 ++++-- src/core.py | 7 +++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a914d3818..ddddfe7bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ Deluge 0.5.7.1 (31 November 2007) - * Increase tracker timeout + * Tweak full hd warning so that it only displays itself once per torrent that + it has to pause. * Fixed crash and corruption of persistent.state while adding a duplicate torrent. Also caused yet another invalid handle error. + * Increase tracker timeout Deluge 0.5.7 (26 November 2007) * Scrape support diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp index 9bd089234..f99839191 100755 --- a/libtorrent/src/peer_connection.cpp +++ b/libtorrent/src/peer_connection.cpp @@ -1399,8 +1399,10 @@ namespace libtorrent if (t->alerts().should_post(alert::fatal)) { - std::string err = "torrent paused: disk write error, " + j.str; - t->alerts().post_alert(file_error_alert(t->get_handle(), err)); + if (j.str != "write failed: No space left on device"){ + std::string err = "torrent paused: disk write error, " + j.str; + t->alerts().post_alert(file_error_alert(t->get_handle(), err)); + } } t->pause(); return; diff --git a/src/core.py b/src/core.py index f3826ba9e..4debe19ac 100644 --- a/src/core.py +++ b/src/core.py @@ -544,14 +544,17 @@ class Manager: # We have enough free space, so lets resume this torrent self.resume(unique_ID) else: + self.pause(unique_ID) + self.unique_IDs[unique_ID].user_paused = True nice_need = common.fsize(total_needed) nice_free = common.fsize(avail) import gtk import dialogs gtk.gdk.threads_enter() dialogs.show_popup_warning(None, _("There is not enough \ -free disk space to complete your download.") + "\n" + _("Space Needed:") + " " \ -+ nice_need + "\n" + _("Available Space:") + " " + nice_free) +free disk space to complete your download.") + "\n" + "This torrents will be \ +paused" + "\n" + _("Space Needed:") + " " + nice_need + "\n" + _("Available \ +Space:") + " " + nice_free) gtk.gdk.threads_leave() print "Not enough free space to resume this torrent!" else: #We're using compact allocation so lets just resume