webui rev 57

This commit is contained in:
Marcos Pinto 2007-10-04 21:49:29 +00:00
parent b8a8757076
commit 20d63448cb
5 changed files with 10 additions and 9 deletions

View File

@ -100,7 +100,7 @@ class plugin_WebUi:
if not dbus_manager: if not dbus_manager:
self.dbusManager = DbusManager(deluge_core, deluge_interface dbus_manager = self.dbusManager = DbusManager(deluge_core, deluge_interface
, self.config, self.config_file) , self.config, self.config_file)
self.dbus_manager = dbus_manager self.dbus_manager = dbus_manager

View File

@ -89,7 +89,7 @@ class DbusManager(dbus.service.Object):
"name": state["name"], "name": state["name"],
"total_size": state["total_size"], "total_size": state["total_size"],
"num_pieces": state["num_pieces"], "num_pieces": state["num_pieces"],
#"state": int(status.state), #? "state": state['state'],
"paused": self.core.is_user_paused(torrent_id), "paused": self.core.is_user_paused(torrent_id),
"progress": int(state["progress"] * 100), "progress": int(state["progress"] * 100),
"next_announce": state["next_announce"], "next_announce": state["next_announce"],

View File

@ -166,7 +166,7 @@ torrent_keys = ['distributed_copies', 'download_payload_rate',
'total_payload_download', 'total_payload_upload', 'total_peers', 'total_payload_download', 'total_payload_upload', 'total_peers',
'total_seeds', 'total_size', 'total_upload', 'total_wanted', 'total_seeds', 'total_size', 'total_upload', 'total_wanted',
'tracker_status', 'upload_payload_rate', 'upload_rate', 'tracker_status', 'upload_payload_rate', 'upload_rate',
'uploaded_memory','tracker'] 'uploaded_memory','tracker','state']
def get_torrent_status(torrent_id): def get_torrent_status(torrent_id):
""" """
@ -189,6 +189,8 @@ def get_torrent_status(torrent_id):
else: else:
status["action"] = "stop" status["action"] = "stop"
status["message"] += str(status["state"])
#add some pre-calculated values #add some pre-calculated values
status.update({ status.update({
"calc_total_downloaded" : (common.fsize(status["total_done"]) "calc_total_downloaded" : (common.fsize(status["total_done"])
@ -429,7 +431,6 @@ class about:
def GET(self, name): def GET(self, name):
return render.about() return render.about()
#/pages #/pages
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -1 +1 @@
56 57

View File

@ -1,5 +1,5 @@
revision-id: mvoncken@gmail.com-20070929213431-0iftu3c3jnmj9lr5 revision-id: mvoncken@gmail.com-20070930083408-sv8mo0mi1rbjnfvk
date: 2007-09-29 23:34:31 +0200 date: 2007-09-30 10:34:08 +0200
build-date: 2007-09-29 23:34:36 +0200 build-date: 2007-09-30 10:34:50 +0200
revno: 56 revno: 57
branch-nick: WebUi branch-nick: WebUi