mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 19:08:40 +00:00
[#2402] [Notification] Fix popup to show actual count of files finished
This commit is contained in:
parent
f834ff6ec5
commit
8485fd591b
1 changed files with 2 additions and 1 deletions
|
@ -207,7 +207,7 @@ class GtkUiNotifications(CustomNotifications):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def _on_torrent_finished_event_popup(self, torrent_id):
|
def _on_torrent_finished_event_popup(self, torrent_id):
|
||||||
d = client.core.get_torrent_status(torrent_id, ["name", "num_files"])
|
d = client.core.get_torrent_status(torrent_id, ["name", "file_progress"])
|
||||||
d.addCallback(self._on_torrent_finished_event_got_torrent_status)
|
d.addCallback(self._on_torrent_finished_event_got_torrent_status)
|
||||||
d.addErrback(self._on_torrent_finished_event_torrent_status_failure)
|
d.addErrback(self._on_torrent_finished_event_torrent_status_failure)
|
||||||
return d
|
return d
|
||||||
|
@ -219,6 +219,7 @@ class GtkUiNotifications(CustomNotifications):
|
||||||
log.debug("Handler for TorrentFinishedEvent GTKUI called. "
|
log.debug("Handler for TorrentFinishedEvent GTKUI called. "
|
||||||
"Got Torrent Status")
|
"Got Torrent Status")
|
||||||
title = _("Finished Torrent")
|
title = _("Finished Torrent")
|
||||||
|
torrent_status["num_files"] = torrent_status["file_progress"].count(1.0)
|
||||||
message = _("The torrent \"%(name)s\" including %(num_files)i file(s) "
|
message = _("The torrent \"%(name)s\" including %(num_files)i file(s) "
|
||||||
"has finished downloading.") % torrent_status
|
"has finished downloading.") % torrent_status
|
||||||
return title, message
|
return title, message
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue