diff --git a/plugins/WebUi/dbus_interface.py b/plugins/WebUi/dbus_interface.py index b253b821e..c42395f70 100644 --- a/plugins/WebUi/dbus_interface.py +++ b/plugins/WebUi/dbus_interface.py @@ -134,7 +134,7 @@ class DbusManager(dbus.service.Object): """same as 0.6 interface""" for torrent_id in torrents: torrent_id = int(torrent_id) - self.core.set_user_pause(torrent_id,True) + self.core.set_user_pause(torrent_id, True) @dbus.service.method(dbus_interface=dbus_interface, in_signature="as", out_signature="") @@ -142,7 +142,15 @@ class DbusManager(dbus.service.Object): """same as 0.6 interface""" for torrent_id in torrents: torrent_id = int(torrent_id) - self.core.set_user_pause(torrent_id,False) + self.core.set_user_pause(torrent_id, False) + + @dbus.service.method(dbus_interface=dbus_interface, + in_signature="as", out_signature="") + def force_reannounce(self, torrents): + """same as 0.6 interface""" + for torrent_id in torrents: + torrent_id = int(torrent_id) + self.core.update_tracker(torrent_id) @dbus.service.method(dbus_interface=dbus_interface, in_signature="sbb", out_signature="") diff --git a/plugins/WebUi/deluge_webserver.py b/plugins/WebUi/deluge_webserver.py index f2ccd43b5..437eac133 100644 --- a/plugins/WebUi/deluge_webserver.py +++ b/plugins/WebUi/deluge_webserver.py @@ -47,18 +47,19 @@ urls = ( "/index(.*)", "index", "/torrent/info/(.*)", "torrent_info", "/torrent/pause(.*)", "torrent_pause", + "/torrent/reannounce/(.*)", "torrent_reannounce", "/torrent/add(.*)", "torrent_add", "/torrent/delete/(.*)", "torrent_delete", "/torrent/queue/up/(.*)", "torrent_queue_up", "/torrent/queue/down/(.*)", "torrent_queue_down", - "/pause_all(.*)", "pause_all", - "/resume_all(.*)", "resume_all", + "/pause_all", "pause_all", + "/resume_all", "resume_all", "/refresh/set(.*)", "refresh_set", "/refresh/(.*)", "refresh", - "/config(.*)","config", - "/home(.*)", "home", - "/about(.*)", "about", - "/logout(.*)", "logout", + "/config","config", + "/home", "home", + "/about", "about", + "/logout", "logout", #remote-api: "/remote/torrent/add(.*)", "remote_torrent_add", #static: @@ -66,8 +67,8 @@ urls = ( "/template/static/(.*)","template_static", #"/downloads/(.*)","downloads" disabled until it can handle large downloads. #default-pages - "/(.*)", "home", - "(.*)", "home" + "/", "home", + "", "home" ) #/routing @@ -93,7 +94,7 @@ class login: class index: "page containing the torrent list." @deluge_page - @auto_refreshed + @auto_refreshed def GET(self, name): vars = web.input(sort=None, order=None) @@ -113,7 +114,7 @@ class index: class torrent_info: @deluge_page - @auto_refreshed + @auto_refreshed def GET(self, torrent_id): return ws.render.torrent_info(get_torrent_status(torrent_id)) @@ -125,7 +126,12 @@ class torrent_pause: ws.proxy.pause_torrent([vars.stop]) elif vars.start: ws.proxy.resume_torrent([vars.start]) + do_redirect() +class torrent_reannounce: + @check_session + def POST(self, torrent_id): + ws.proxy.force_reannounce([torrent_id]) do_redirect() class torrent_add: diff --git a/plugins/WebUi/revno b/plugins/WebUi/revno index ee977b5ec..5bc6609e3 100644 --- a/plugins/WebUi/revno +++ b/plugins/WebUi/revno @@ -1 +1 @@ -115 +117 diff --git a/plugins/WebUi/templates/deluge/torrent_info.html b/plugins/WebUi/templates/deluge/torrent_info.html index 262208367..4082ff481 100644 --- a/plugins/WebUi/templates/deluge/torrent_info.html +++ b/plugins/WebUi/templates/deluge/torrent_info.html @@ -81,7 +81,7 @@ class="deluge_button"> $:render.part_button('GET', '/torrent/delete/' + str(torrent.id), _('Remove'), 'tango/user-trash.png') - +$:render.part_button('POST', '/torrent/reannounce/' + str(torrent.id), _('Reannounce'), 'tango/view-refresh.png')