mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-20 07:08:30 +00:00
fix torrent actions
This commit is contained in:
parent
52c6cce6b3
commit
b9a7c87a2d
@ -56,12 +56,12 @@ from deluge.ui.tracker_icons import TrackerIcons
|
|||||||
page_manager = component.get("PageManager")
|
page_manager = component.get("PageManager")
|
||||||
config = ConfigManager("webui06.conf")
|
config = ConfigManager("webui06.conf")
|
||||||
|
|
||||||
def route(url, klass):
|
def route(url, klass, use_module=True):
|
||||||
"""
|
"""
|
||||||
url-mapping is using page_manager
|
url-mapping is using page_manager
|
||||||
not the default web.py way ; I want class decorators!
|
not the default web.py way ; I want class decorators!
|
||||||
"""
|
"""
|
||||||
page_manager.register_page(url, klass)
|
page_manager.register_page(url, klass,use_module)
|
||||||
|
|
||||||
#pages:
|
#pages:
|
||||||
class login:
|
class login:
|
||||||
@ -145,7 +145,7 @@ def reg_torrents_POST(url_name, proxy_command):
|
|||||||
getattr(proxy, proxy_command)(torrent_ids)
|
getattr(proxy, proxy_command)(torrent_ids)
|
||||||
do_redirect()
|
do_redirect()
|
||||||
_page_class.__name__ = "TORRENTS_POST:" + proxy_command
|
_page_class.__name__ = "TORRENTS_POST:" + proxy_command
|
||||||
route("/torrent/%s/(.*)" % url_name, _page_class)
|
route("/torrent/%s/(.*)" % url_name, _page_class, use_module=False)
|
||||||
|
|
||||||
reg_torrents_POST("start", "resume_torrent")
|
reg_torrents_POST("start", "resume_torrent")
|
||||||
reg_torrents_POST("stop", "pause_torrent")
|
reg_torrents_POST("stop", "pause_torrent")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user