mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 23:18:40 +00:00
Fix exception when removing multiple torrents at once.
Updated TODO.
This commit is contained in:
parent
466292d38e
commit
f2f73b8539
5 changed files with 15 additions and 12 deletions
2
TODO
2
TODO
|
@ -1,4 +1,3 @@
|
||||||
* Have peer numbers show what we receive from tracker_reply_alert
|
|
||||||
* Have the ui better handle not being able to connect to the daemon.
|
* Have the ui better handle not being able to connect to the daemon.
|
||||||
* Tray locking and other tray options (close to tray, start in tray..)
|
* Tray locking and other tray options (close to tray, start in tray..)
|
||||||
* Add state saving to listview.. this includes saving column size and position.
|
* Add state saving to listview.. this includes saving column size and position.
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
* Change the menubar.py gtkui component to menus.py and add support for plugins
|
* Change the menubar.py gtkui component to menus.py and add support for plugins
|
||||||
to add menuitems to the torrentmenu in an easy way.
|
to add menuitems to the torrentmenu in an easy way.
|
||||||
* Add the tracker responses to the torrent details
|
* Add the tracker responses to the torrent details
|
||||||
* Fast resume saving
|
|
||||||
* Restart daemon function
|
* Restart daemon function
|
||||||
* Sync the details pane to current trunk
|
* Sync the details pane to current trunk
|
||||||
* Automatically save torrent state every ~5 minutes, much like how
|
* Automatically save torrent state every ~5 minutes, much like how
|
||||||
|
|
|
@ -151,8 +151,7 @@ class Core(dbus.service.Object):
|
||||||
log.info("Shutting down core..")
|
log.info("Shutting down core..")
|
||||||
self.loop.quit()
|
self.loop.quit()
|
||||||
self.plugins.shutdown()
|
self.plugins.shutdown()
|
||||||
del self.plugins
|
self.torrents.shutdown()
|
||||||
del self.torrents
|
|
||||||
# Make sure the config file has been saved
|
# Make sure the config file has been saved
|
||||||
self.config.save()
|
self.config.save()
|
||||||
del self.config
|
del self.config
|
||||||
|
@ -265,7 +264,9 @@ class Core(dbus.service.Object):
|
||||||
status = self.torrents[torrent_id].get_status(nkeys)
|
status = self.torrents[torrent_id].get_status(nkeys)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# The torrent_id is not found in the torrentmanager, so return None
|
# The torrent_id is not found in the torrentmanager, so return None
|
||||||
return None
|
status = None
|
||||||
|
status = pickle.dumps(status)
|
||||||
|
return status
|
||||||
|
|
||||||
# Get the leftover fields and ask the plugin manager to fill them
|
# Get the leftover fields and ask the plugin manager to fill them
|
||||||
leftover_fields = list(set(nkeys) - set(status.keys()))
|
leftover_fields = list(set(nkeys) - set(status.keys()))
|
||||||
|
|
|
@ -94,12 +94,12 @@ class Torrent:
|
||||||
progress = status.progress*100
|
progress = status.progress*100
|
||||||
|
|
||||||
# Get the total number of seeds and peers
|
# Get the total number of seeds and peers
|
||||||
if status.num_complete is -1:
|
if status.num_complete == -1:
|
||||||
total_seeds = status.num_seeds
|
total_seeds = status.num_seeds
|
||||||
else:
|
else:
|
||||||
total_seeds = status.num_complete
|
total_seeds = status.num_complete
|
||||||
|
|
||||||
if status.num_incomplete is -1:
|
if status.num_incomplete == -1:
|
||||||
total_peers = status.num_peers - status.num_seeds
|
total_peers = status.num_peers - status.num_seeds
|
||||||
else:
|
else:
|
||||||
total_peers = status.num_incomplete
|
total_peers = status.num_incomplete
|
||||||
|
|
|
@ -79,7 +79,7 @@ class TorrentManager:
|
||||||
self.config.register_set_function("max_upload_slots_per_torrent",
|
self.config.register_set_function("max_upload_slots_per_torrent",
|
||||||
self.on_set_max_upload_slots_per_torrent)
|
self.on_set_max_upload_slots_per_torrent)
|
||||||
|
|
||||||
def __del__(self):
|
def shutdown(self):
|
||||||
log.debug("TorrentManager shutting down..")
|
log.debug("TorrentManager shutting down..")
|
||||||
# Save state on shutdown
|
# Save state on shutdown
|
||||||
self.save_state()
|
self.save_state()
|
||||||
|
|
|
@ -97,6 +97,10 @@ class TorrentDetails:
|
||||||
selected,
|
selected,
|
||||||
status_keys)
|
status_keys)
|
||||||
|
|
||||||
|
# Check to see if we got valid data from the core
|
||||||
|
if status is None:
|
||||||
|
return
|
||||||
|
|
||||||
# We need to adjust the value core gives us for progress
|
# We need to adjust the value core gives us for progress
|
||||||
progress = status["progress"]/100
|
progress = status["progress"]/100
|
||||||
self.progress_bar.set_fraction(progress)
|
self.progress_bar.set_fraction(progress)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue