WebUi Plugin 0.5

Suggest, post, or discuss plugins for Deluge
sluthead
Leecher
Leecher
Posts: 62
Joined: Sun Sep 02, 2007 8:50 am

Re: WebUI (alfa)

Post by sluthead »

crux wrote:Just wanted to drop a line back and say it worked great for me! I did receive a dbus error but it was because I hit refresh to see the status of the torrent and my small cable line was exhausted from maxing out on d/l and u/l speeds. Once I dropped them a little in preferences I didn't see the error anymore.

Great work and thanks!

Can you upload torrents through it?
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: WebUI (alfa)

Post by markybob »

sluthead wrote:
crux wrote:Just wanted to drop a line back and say it worked great for me! I did receive a dbus error but it was because I hit refresh to see the status of the torrent and my small cable line was exhausted from maxing out on d/l and u/l speeds. Once I dropped them a little in preferences I didn't see the error anymore.

Great work and thanks!

Can you upload torrents through it?
yes
somedude
New User
New User
Posts: 8
Joined: Sat Sep 22, 2007 9:27 pm

Re: WebUI (alfa)

Post by somedude »

nice ui with some glitches but nice.. here some hints and bug reports.
and btw i use deluge today the first time and testing it currently :D

- Make the port a textbox instead a dropdown. i use a port > 10000 (ok i fixed that one for myself :D simple changed that i see only my port in the list)
- If deluge crashes, the webserver still running
- Adding torrents via torrent file gives an error (like the one posted at page 1 of this thread). Adding url directly crashed deluge at one test but now it worked :D
- in the code you do a redirect to url, and checks if no http://ip:port is present the string, i had the problem (simple removed the part) that i have a apache redirect/proxy rule running so if i got redirected i go to ip:port instead the "real url" :D
- looks like the autorefresh feature does not work.

i also created my own web template added the relevant files to this post

hope deluge works great for me and i wish you much fun progg'in at your webui :D

bye
Attachments
simple_ui.tar.gz
simple ui
(6.59 KiB) Downloaded 401 times
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: WebUI (alfa)

Post by mvoncken »

Thanks for the feedback somedude :D

*Make the port a textbox instead a dropdown. i use a port > 10000 (ok i fixed that one for myself :D simple changed that i see only my port in the list)

I changed the max to 100000

*If deluge crashes, the webserver still running

Deluge should'nt crash, perhaps i'll do something with a webui.pid file in the future.

*Adding torrents via torrent file gives an error (like the one posted at page 1 of this thread). Adding url directly crashed deluge at one test but now it worked :D

python-dbus corrupts binary data for sluthead and you.
Worked around it by using base64, but i wonder: What is the version of dbus and the python dbus bindings on your system?

*in the code you do a redirect to url, and checks if no http://ip:port is present the string, i had the problem (simple removed the part) that i have a apache redirect/proxy rule running so if i got redirected i go to ip:port instead the "real url" :D

What are you talking about ?

*looks like the autorefresh feature does not work.

yea, that was still in development, fixed now.

*i also created my own web template added the relevant files to this post

Thanks , Great that you give something back :D
I based my new default template on yours.
dev: webui, core, labels | irc:vonck7 |
somedude
New User
New User
Posts: 8
Joined: Sat Sep 22, 2007 9:27 pm

Re: WebUI (alfa)

Post by somedude »

changed in webpy022/http.py: redirect function

Code: Select all

 
   # if newloc is relative then make it absolute
#    if newloc.startswith('/'):
 #       newloc = web.ctx.home + newloc
port range in __init__.py:

Code: Select all

self.port.set_range(19000, 20000)
detail error by adding a .torrent. (i just alterd my port, username and removed the torrent data.

Code: Select all

dbus.exceptions.DBusException at /torrent/add
org.freedesktop.DBus.Python.exceptions.ValueError: Traceback (most recent call last): File "/var/lib/python-support/python2.4/dbus/service.py", line 687, in _message_cb retval = candidate_method(self, *args, **keywords) File "/usr/share/deluge/plugins/WebUi/dbus_interface.py", line 168, in add_torrent_filecontent filecontent = pickle.loads(filecontent_p) File "pickle.py", line 1394, in loads return Unpickler(file).load() File "pickle.py", line 872, in load dispatch[key](self) File "pickle.py", line 984, in load_string raise ValueError, "insecure string pickle" ValueError: insecure string pickle
Python 	/var/lib/python-support/python2.4/dbus/connection.py in call_blocking, line 601
Web 	POST http://127.0.0.1:10000/torrent/add
Traceback (innermost first)

    * /var/lib/python-support/python2.4/dbus/connection.py in call_blocking
       594. logging.basicConfig()
       595. _logger.error('Unable to set arguments %r according to '
       596. 'signature %r: %s: %s',
       597. args, signature, e.__class__, e)
       598. raise
       599.
       600. # make a blocking call
       601. reply_message = self.send_message_with_reply_and_block( ...
       602. message, timeout)
       603. args_list = reply_message.get_args_list(**get_args_opts)
       604. if len(args_list) == 0:
       605. return None
       606. elif len(args_list) == 1:
       607. return args_list[0]
      ? Local vars
      Variable	Value
      args	
      bus_name	
      dbus.UTF8String(':1.56')
      byte_arrays	
      False
      dbus_interface	
      None
      get_args_opts	
      {'byte_arrays': False, 'utf8_strings': False}
      message	
      <dbus.lowlevel.MethodCallMessage object at 0x2ab82b4de738>
      method	
      'add_torrent_filecontent'
      object_path	
      '/org/deluge_torrent/DelugeDbusPlugin'
      self	
      <dbus._dbus.SessionBus (session) at 0x2ab82efed410>
      signature	
      None
      timeout	
      -1.0
      utf8_strings	
      False
    * /var/lib/python-support/python2.4/dbus/proxies.py in __call__
       127. **keywords)
       128. else:
       129. return self._connection.call_blocking(self._named_service,
       130. self._object_path,
       131. dbus_interface,
       132. self._method_name,
       133. introspect_sig,
       134. args, ...
       135. **keywords)
       136.
       137. def call_async(self, *args, **keywords):
       138. reply_handler = keywords.pop('reply_handler', None)
       139. error_handler = keywords.pop('error_handler', None)
       140.
      ? Local vars
      Variable	Value
      args	
      dbus_interface	
      None
      error_handler	
      None
      ignore_reply	
      False
      introspect_sig	
      None
      key	
      'add_torrent_filecontent'
      keywords	
      {}
      reply_handler	
      None
      self	
      <dbus.proxies._ProxyMethod instance at 0x2ab82f67f098>
    * /usr/share/deluge/plugins/WebUi/deluge_webserver.py in POST
       280. if vars.url:
       281. proxy.add_torrent_url(vars.url)
       282. do_redirect()
       283. elif vars.torrent.filename:
       284. data = vars.torrent.file.read()
       285. data_p = pickle.dumps(data)
       286. #!!!! I want to loze the pickle!!!
       287. proxy.add_torrent_filecontent(vars.torrent.filename,data_p) ...
       288. do_redirect()
       289. else:
       290. error_page(_("no data."))
       291.
       292.
       293. class torrent_delete:
      ? Local vars
      Variable	Value
      data	
      name	
      ''
      self	
      <deluge_webserver.torrent_add instance at 0x2ab82f665290>
    * /usr/share/deluge/plugins/WebUi/deluge_webserver.py in deco
       101. """
       102. a decorator
       103. return func if session is valid, else redirect to login page.
       104. """
       105. def deco(self, name):
       106. ck = cookies()
       107. if ck.has_key("session_id") and ck["session_id"] in SESSIONS:
       108. return func(self, name) #ok, continue.. ...
       109. else:
       110. seeother("/login") #do not continue, and redirect to login page
       111. return deco
       112.
       113. def deluge_page(func):
       114. return check_session(deluge_page_noauth(func))
      ? Local vars
      Variable	Value
      ck	
      <Storage {'session_id': '0.879712696758'}>
      func	
      <function POST at 0x2ab82effbb18>
      name	
      ''
      self	
      <deluge_webserver.torrent_add instance at 0x2ab82f665290>
    * /usr/share/deluge/plugins/WebUi/webpy022/request.py in handle
        53. meth = "GET"
        54. if not hasattr(cls, meth):
        55. return nomethod(cls)
        56. tocall = getattr(cls(), meth)
        57. args = list(result.groups())
        58. for d in re.findall(r'\\(\d+)', ofn):
        59. args.pop(int(d) - 1)
        60. return tocall(*([x and urllib.unquote(x) for x in args] + fna)) ...
        61.
        62. return web.notfound()
        63.
        64. def nomethod(cls):
        65. """Returns a `405 Method Not Allowed` error for `cls`."""
        66. web.ctx.status = '405 Method Not Allowed'
      ? Local vars
      Variable	Value
      args	
      ['']
      cls	
      <class deluge_webserver.torrent_add at 0x2ab82effe710>
      fn	
      'torrent_add'
      fna	
      []
      fvars	
      {'APP': 'deluge', 'DIR': '/usr/share/locale', 'INSTALL_PREFIX': '/usr', 'SESSIONS': {'0.0455438467493': {'user': 'somed'}, '0.172460280754': {'user': 'somed'}, '0.217257296255': {'user': 'somed'}, '0.505501913905': {'user': 'somed'}, '0.525419851485': {'user': 'somed'}, '0.604378811839': {'user': 'somed'}, '0.715785404352': {'user': 'somed'}, '0.879712696758': {'user': 'somed'}, '0.972870455497': {'user': 'somed'}}, 'Storage': <class 'webpy022.utils.Storage'>, '__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': '/usr/share/deluge/plugins/WebUi/run_webserver', '__name__': '__main__', 'attrgetter': <type 'operator.attrgetter'>, 'bus': <dbus._dbus.SessionBus (session) at 0x2ab82efed410>, 'check_session': <function check_session at 0x2ab82effb0c8>, 'common': <module 'deluge.common' from '/var/lib/python-support/python2.4/deluge/common.pyc'>, 'cookies': <function cookies at 0x2ab82e5a4578>, 'dbus': <module 'dbus' from '/var/lib/python-support/python2.4/dbus/__init__.pyc'>, 'deluge_page': <function deluge_page at 0x2ab82effb140>, 'deluge_page_noauth': <function deluge_page_noauth at 0x2ab82effb050>, 'do_redirect': <function do_redirect at 0x2ab82eff1f50>, 'error_page': <function error_page at 0x2ab82effb1b8>, 'get_torrent_status': <function get_torrent_status at 0x2ab82effb230>, 'gettext': <module 'gettext' from '/usr/lib/python2.4/gettext.pyc'>, 'index': <class deluge_webserver.index at 0x2ab82effe5f0>, 'locale': <module 'locale' from '/usr/lib/python2.4/locale.pyc'>, 'login': <class deluge_webserver.login at 0x2ab82effe590>, 'os': <module 'os' from '/usr/lib/python2.4/os.pyc'>, 'pause_all': <class deluge_webserver.pause_all at 0x2ab82effe7d0>, 'pickle': <module 'pickle' from '/usr/lib/python2.4/pickle.pyc'>, 'platform': <module 'platform' from '/usr/lib/python2.4/platform.pyc'>, 'proxy': <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x2ab82efed410> :1.56 /org/deluge_torrent/DelugeDbusPlugin at 0x2ab82efd2f10>, 'random': <module 'random' from '/usr/lib/python2.4/random.pyc'>, 'refresh_off': <class deluge_webserver.refresh_off at 0x2ab82effe890>, 'refresh_set': <class deluge_webserver.refresh_set at 0x2ab82effe8f0>, 'render': <webpy022.template.render instance at 0x2ab82eff53f8>, 'resume_all': <class deluge_webserver.resume_all at 0x2ab82effe830>, 'seeother': <function seeother at 0x2ab82e5f6398>, 'setcookie': <function setcookie at 0x2ab82e5a4500>, 'sort_order': <function sort_order at 0x2ab82effb320>, 'template': <module 'webpy022.template' from '/usr/share/deluge/plugins/WebUi/webpy022/template.pyc'>, 'template_crop': <function template_crop at 0x2ab82effb2a8>, 'torrent_add': <class deluge_webserver.torrent_add at 0x2ab82effe710>, 'torrent_delete': <class deluge_webserver.torrent_delete at 0x2ab82effe770>, 'torrent_info': <class deluge_webserver.torrent_info at 0x2ab82effe650>, 'torrent_keys': ['distributed_copies', 'download_payload_rate', 'download_rate', 'eta', 'is_seed', 'message', 'name', 'next_announce', 'num_files', 'num_peers', 'num_pieces', 'num_seeds', 'paused', 'piece_length', 'progress', 'ratio', 'total_done', 'total_download', 'total_payload_download', 'total_payload_upload', 'total_peers', 'total_seeds', 'total_size', 'total_upload', 'total_wanted', 'tracker_status', 'upload_payload_rate', 'upload_rate', 'uploaded_memory', 'tracker'], 'torrent_pause': <class deluge_webserver.torrent_pause at 0x2ab82effe6b0>, 'urls': ('/login(.*)', 'login', '/index(.*)', 'index', '/torrent/info/(.*)', 'torrent_info', '/torrent/pause(.*)', 'torrent_pause', '/torrent/add(.*)', 'torrent_add', '/torrent/delete/(.*)', 'torrent_delete', '/pause_all(.*)', 'pause_all', '/resume_all(.*)', 'resume_all', '/refresh/off', 'refresh_off', '/refresh/set(.*)', 'refresh_set', '/', 'login', '', 'login'), 'web': <module 'webpy022' from '/usr/share/deluge/plugins/WebUi/webpy022/__init__.pyc'>}
      mapping	
      ('/login(.*)', 'login', '/index(.*)', 'index', '/torrent/info/(.*)', 'torrent_info', '/torrent/pause(.*)', 'torrent_pause', '/torrent/add(.*)', 'torrent_add', '/torrent/delete/(.*)', 'torrent_delete', '/pause_all(.*)', 'pause_all', '/resume_all(.*)', 'resume_all', '/refresh/off', 'refresh_off', '/refresh/set(.*)', 'refresh_set', '/', 'login', '', 'login')
      meth	
      'POST'
      mod	
      {'APP': 'deluge', 'DIR': '/usr/share/locale', 'INSTALL_PREFIX': '/usr', 'SESSIONS': {'0.0455438467493': {'user': 'somed'}, '0.172460280754': {'user': 'somed'}, '0.217257296255': {'user': 'somed'}, '0.505501913905': {'user': 'somed'}, '0.525419851485': {'user': 'somed'}, '0.604378811839': {'user': 'somed'}, '0.715785404352': {'user': 'somed'}, '0.879712696758': {'user': 'somed'}, '0.972870455497': {'user': 'somed'}}, 'Storage': <class 'webpy022.utils.Storage'>, '__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': '/usr/share/deluge/plugins/WebUi/run_webserver', '__name__': '__main__', 'attrgetter': <type 'operator.attrgetter'>, 'bus': <dbus._dbus.SessionBus (session) at 0x2ab82efed410>, 'check_session': <function check_session at 0x2ab82effb0c8>, 'common': <module 'deluge.common' from '/var/lib/python-support/python2.4/deluge/common.pyc'>, 'cookies': <function cookies at 0x2ab82e5a4578>, 'dbus': <module 'dbus' from '/var/lib/python-support/python2.4/dbus/__init__.pyc'>, 'deluge_page': <function deluge_page at 0x2ab82effb140>, 'deluge_page_noauth': <function deluge_page_noauth at 0x2ab82effb050>, 'do_redirect': <function do_redirect at 0x2ab82eff1f50>, 'error_page': <function error_page at 0x2ab82effb1b8>, 'get_torrent_status': <function get_torrent_status at 0x2ab82effb230>, 'gettext': <module 'gettext' from '/usr/lib/python2.4/gettext.pyc'>, 'index': <class deluge_webserver.index at 0x2ab82effe5f0>, 'locale': <module 'locale' from '/usr/lib/python2.4/locale.pyc'>, 'login': <class deluge_webserver.login at 0x2ab82effe590>, 'os': <module 'os' from '/usr/lib/python2.4/os.pyc'>, 'pause_all': <class deluge_webserver.pause_all at 0x2ab82effe7d0>, 'pickle': <module 'pickle' from '/usr/lib/python2.4/pickle.pyc'>, 'platform': <module 'platform' from '/usr/lib/python2.4/platform.pyc'>, 'proxy': <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x2ab82efed410> :1.56 /org/deluge_torrent/DelugeDbusPlugin at 0x2ab82efd2f10>, 'random': <module 'random' from '/usr/lib/python2.4/random.pyc'>, 'refresh_off': <class deluge_webserver.refresh_off at 0x2ab82effe890>, 'refresh_set': <class deluge_webserver.refresh_set at 0x2ab82effe8f0>, 'render': <webpy022.template.render instance at 0x2ab82eff53f8>, 'resume_all': <class deluge_webserver.resume_all at 0x2ab82effe830>, 'seeother': <function seeother at 0x2ab82e5f6398>, 'setcookie': <function setcookie at 0x2ab82e5a4500>, 'sort_order': <function sort_order at 0x2ab82effb320>, 'template': <module 'webpy022.template' from '/usr/share/deluge/plugins/WebUi/webpy022/template.pyc'>, 'template_crop': <function template_crop at 0x2ab82effb2a8>, 'torrent_add': <class deluge_webserver.torrent_add at 0x2ab82effe710>, 'torrent_delete': <class deluge_webserver.torrent_delete at 0x2ab82effe770>, 'torrent_info': <class deluge_webserver.torrent_info at 0x2ab82effe650>, 'torrent_keys': ['distributed_copies', 'download_payload_rate', 'download_rate', 'eta', 'is_seed', 'message', 'name', 'next_announce', 'num_files', 'num_peers', 'num_pieces', 'num_seeds', 'paused', 'piece_length', 'progress', 'ratio', 'total_done', 'total_download', 'total_payload_download', 'total_payload_upload', 'total_peers', 'total_seeds', 'total_size', 'total_upload', 'total_wanted', 'tracker_status', 'upload_payload_rate', 'upload_rate', 'uploaded_memory', 'tracker'], 'torrent_pause': <class deluge_webserver.torrent_pause at 0x2ab82effe6b0>, 'urls': ('/login(.*)', 'login', '/index(.*)', 'index', '/torrent/info/(.*)', 'torrent_info', '/torrent/pause(.*)', 'torrent_pause', '/torrent/add(.*)', 'torrent_add', '/torrent/delete/(.*)', 'torrent_delete', '/pause_all(.*)', 'pause_all', '/resume_all(.*)', 'resume_all', '/refresh/off', 'refresh_off', '/refresh/set(.*)', 'refresh_set', '/', 'login', '', 'login'), 'web': <module 'webpy022' from '/usr/share/deluge/plugins/WebUi/webpy022/__init__.pyc'>}
      ofn	
      'torrent_add'
      ofno	
      'torrent_add'
      result	
      <_sre.SRE_Match object at 0x2ab82f62fdf0>
      tocall	
      <bound method torrent_add.deco of <deluge_webserver.torrent_add instance at 0x2ab82f665290>>
      url	
      '/torrent/add(.*)'
      x	
      ''
    * /usr/share/deluge/plugins/WebUi/webpy022/request.py in <lambda>
       123. return name
       124.
       125. mod = __import__(modname(), None, None, [""])
       126. #@@probably should replace this with some inspect magic
       127. name = utils.dictfind(fvars, inp)
       128. func = lambda: handle(getattr(mod, name), mod)
       129. else:
       130. func = lambda: handle(inp, fvars) ...
       131. else:
       132. func = inp
       133. return func
       134.
       135. def run(inp, fvars, *middleware):
       136. """
      ? Local vars
      Variable	Value
      fvars	
      {'APP': 'deluge', 'DIR': '/usr/share/locale', 'INSTALL_PREFIX': '/usr', 'SESSIONS': {'0.0455438467493': {'user': 'somed'}, '0.172460280754': {'user': 'somed'}, '0.217257296255': {'user': 'somed'}, '0.505501913905': {'user': 'somed'}, '0.525419851485': {'user': 'somed'}, '0.604378811839': {'user': 'somed'}, '0.715785404352': {'user': 'somed'}, '0.879712696758': {'user': 'somed'}, '0.972870455497': {'user': 'somed'}}, 'Storage': <class 'webpy022.utils.Storage'>, '__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': '/usr/share/deluge/plugins/WebUi/run_webserver', '__name__': '__main__', 'attrgetter': <type 'operator.attrgetter'>, 'bus': <dbus._dbus.SessionBus (session) at 0x2ab82efed410>, 'check_session': <function check_session at 0x2ab82effb0c8>, 'common': <module 'deluge.common' from '/var/lib/python-support/python2.4/deluge/common.pyc'>, 'cookies': <function cookies at 0x2ab82e5a4578>, 'dbus': <module 'dbus' from '/var/lib/python-support/python2.4/dbus/__init__.pyc'>, 'deluge_page': <function deluge_page at 0x2ab82effb140>, 'deluge_page_noauth': <function deluge_page_noauth at 0x2ab82effb050>, 'do_redirect': <function do_redirect at 0x2ab82eff1f50>, 'error_page': <function error_page at 0x2ab82effb1b8>, 'get_torrent_status': <function get_torrent_status at 0x2ab82effb230>, 'gettext': <module 'gettext' from '/usr/lib/python2.4/gettext.pyc'>, 'index': <class deluge_webserver.index at 0x2ab82effe5f0>, 'locale': <module 'locale' from '/usr/lib/python2.4/locale.pyc'>, 'login': <class deluge_webserver.login at 0x2ab82effe590>, 'os': <module 'os' from '/usr/lib/python2.4/os.pyc'>, 'pause_all': <class deluge_webserver.pause_all at 0x2ab82effe7d0>, 'pickle': <module 'pickle' from '/usr/lib/python2.4/pickle.pyc'>, 'platform': <module 'platform' from '/usr/lib/python2.4/platform.pyc'>, 'proxy': <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x2ab82efed410> :1.56 /org/deluge_torrent/DelugeDbusPlugin at 0x2ab82efd2f10>, 'random': <module 'random' from '/usr/lib/python2.4/random.pyc'>, 'refresh_off': <class deluge_webserver.refresh_off at 0x2ab82effe890>, 'refresh_set': <class deluge_webserver.refresh_set at 0x2ab82effe8f0>, 'render': <webpy022.template.render instance at 0x2ab82eff53f8>, 'resume_all': <class deluge_webserver.resume_all at 0x2ab82effe830>, 'seeother': <function seeother at 0x2ab82e5f6398>, 'setcookie': <function setcookie at 0x2ab82e5a4500>, 'sort_order': <function sort_order at 0x2ab82effb320>, 'template': <module 'webpy022.template' from '/usr/share/deluge/plugins/WebUi/webpy022/template.pyc'>, 'template_crop': <function template_crop at 0x2ab82effb2a8>, 'torrent_add': <class deluge_webserver.torrent_add at 0x2ab82effe710>, 'torrent_delete': <class deluge_webserver.torrent_delete at 0x2ab82effe770>, 'torrent_info': <class deluge_webserver.torrent_info at 0x2ab82effe650>, 'torrent_keys': ['distributed_copies', 'download_payload_rate', 'download_rate', 'eta', 'is_seed', 'message', 'name', 'next_announce', 'num_files', 'num_peers', 'num_pieces', 'num_seeds', 'paused', 'piece_length', 'progress', 'ratio', 'total_done', 'total_download', 'total_payload_download', 'total_payload_upload', 'total_peers', 'total_seeds', 'total_size', 'total_upload', 'total_wanted', 'tracker_status', 'upload_payload_rate', 'upload_rate', 'uploaded_memory', 'tracker'], 'torrent_pause': <class deluge_webserver.torrent_pause at 0x2ab82effe6b0>, 'urls': ('/login(.*)', 'login', '/index(.*)', 'index', '/torrent/info/(.*)', 'torrent_info', '/torrent/pause(.*)', 'torrent_pause', '/torrent/add(.*)', 'torrent_add', '/torrent/delete/(.*)', 'torrent_delete', '/pause_all(.*)', 'pause_all', '/resume_all(.*)', 'resume_all', '/refresh/off', 'refresh_off', '/refresh/set(.*)', 'refresh_set', '/', 'login', '', 'login'), 'web': <module 'webpy022' from '/usr/share/deluge/plugins/WebUi/webpy022/__init__.pyc'>}
      inp	
      ('/login(.*)', 'login', '/index(.*)', 'index', '/torrent/info/(.*)', 'torrent_info', '/torrent/pause(.*)', 'torrent_pause', '/torrent/add(.*)', 'torrent_add', '/torrent/delete/(.*)', 'torrent_delete', '/pause_all(.*)', 'pause_all', '/resume_all(.*)', 'resume_all', '/refresh/off', 'refresh_off', '/refresh/set(.*)', 'refresh_set', '/', 'login', '', 'login')
    * /usr/share/deluge/plugins/WebUi/webpy022/webapi.py in wsgifunc
       296. def wsgifunc(func, *middleware):
       297. """Returns a WSGI-compatible function from a webpy-function."""
       298. middleware = list(middleware)
       299.
       300. def wsgifunc(env, start_resp):
       301. _load(env)
       302. try:
       303. result = func() ...
       304. except StopIteration:
       305. result = None
       306. except:
       307. print >> debug, traceback.format_exc()
       308. result = internalerror()
       309.
      ? Local vars 
somedude
New User
New User
Posts: 8
Joined: Sat Sep 22, 2007 9:27 pm

Re: WebUI (alfa)

Post by somedude »

Oh you posted too, so some answers to your questions:

About the port thing, textbox or 65536 as max. (a higher port is not possible)

About the whole apache thing:

I have the WebUi running at some port. take 8191 as sample. I also have a Apache running with listens at port 80. So i dont want to use for the ip:port thing to connect to my webui. so i created a apache redirect rule.
if i send a spezific hostname (take "myp2pclient.dyndns.org") it redirects internal all traffic via mod_redirect and mod_proxy to the real Webui listen at 127.0.0.1:8191.

So without my little redirect change after login (if i go to http://myp2pclient.dyndns.org) it redirects mit to (http://127.0.0.1:8191) because the redirect method dont use relative paths. its does a "Location: http://127.0.0.1:8191/index" instead a "Location: /index".

Hope i explained that correctly i'm not a native english speaker.

bye
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: WebUI (alfa)

Post by mvoncken »

wow, that's a fast reply :D

I see this in the error-message:
"filecontent = pickle.loads(filecontent_p) "
That's Old code, that's not in the source-code anymore.

Are you shure you restarted deluge and are you using an updated dbus_interface.py?

Hmm,
I really don't like using a modified web.py , but it's included now anyway so i'll change it.

Edit : LOL, some async chat going on here, that's a bit of a coincidence.
dev: webui, core, labels | irc:vonck7 |
somedude
New User
New User
Posts: 8
Joined: Sat Sep 22, 2007 9:27 pm

Re: WebUI (alfa)

Post by somedude »

I just downloaded your last version (2 min ago) and you have syntax error in your dbus_interface.py :D

"Sunday, September 23, 2007 4:05 PM 231384 WebUi.tgz"
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: WebUI (alfa)

Post by mvoncken »

somedude wrote:I just downloaded your last version (2 min ago) and you have syntax error in your dbus_interface.py :D

"Sunday, September 23, 2007 4:05 PM 231384 WebUi.tgz"
Are you using python 2.4?
Perhaps i have python 2.5 only code hidden somewhere.
Could you give me an error-message.

Edit:removed a generator-comprehension from dbus_pythonize, and uploaded new version.
Edit2:
Oops, I should never upload 1-line fixes without testing them :shock:
Anyway:
I hope the new-one is 2.4 safe, i'll install 2.4 myself later to make shure.
-And tell me if uploading is fixed for you.
Edit 3:
Great :D thanks.
Last edited by mvoncken on Sun Sep 23, 2007 3:11 pm, edited 3 times in total.
dev: webui, core, labels | irc:vonck7 |
somedude
New User
New User
Posts: 8
Joined: Sat Sep 22, 2007 9:27 pm

Re: WebUI (alfa)

Post by somedude »

Code: Select all

no existing Deluge session
Starting new Deluge session...
deluge_core; using libtorrent 0.13.0.0. Compiled with NDEBUG.
Applying preferences
Pickling state...
Scanning plugin dir /usr/share/deluge/plugins
Initialising plugin TorrentFiles
Traceback (most recent call last):
  File "/usr/bin/deluge", line 121, in ?
    start_deluge()
  File "/usr/bin/deluge", line 109, in start_deluge
    interface = deluge.interface.DelugeGTK()
  File "/var/lib/python-support/python2.4/deluge/interface.py", line 60, in __init__
    self.plugins.scan_for_plugins()
  File "/var/lib/python-support/python2.4/deluge/plugins.py", line 61, in scan_for_plugins
    mod = __import__(modname, globals(), locals(), [''])
  File "/usr/share/deluge/plugins/WebUi/__init__.py", line 41, in ?
    from dbus_interface import DbusManager
  File "/usr/share/deluge/plugins/WebUi/dbus_interface.py", line 217
    finally:
          ^
and yes i used python 2.4.. i now tested it with 2.5 and it works :D

Edit: with your new version 4:57 i got a new error :D

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/deluge", line 121, in <module>
    start_deluge()
  File "/usr/bin/deluge", line 109, in start_deluge
    interface = deluge.interface.DelugeGTK()
  File "/var/lib/python-support/python2.5/deluge/interface.py", line 60, in __init__
    self.plugins.scan_for_plugins()
  File "/var/lib/python-support/python2.5/deluge/plugins.py", line 61, in scan_for_plugins
    mod = __import__(modname, globals(), locals(), [''])
  File "/usr/share/deluge/plugins/WebUi/__init__.py", line 41, in <module>
    from dbus_interface import DbusManager
  File "/usr/share/deluge/plugins/WebUi/dbus_interface.py", line 40, in <module>
    from dbus_pythonize import pythonize
  File "/usr/share/deluge/plugins/WebUi/dbus_pythonize.py", line 14
    ([pythonize(key), pythonize(value)) for key, value in var.iteritems()]
                                                      ^
as you can see with python 2.5

edit2: with the 5:02 version too :D
edit3: the problem is with python 2.4 aswell
edit4: :D 5:06 all fine.. testing torrent upload now
edit5: works like a charm, thank you
edit6: only a small graphical glitch.. the progress column is to small, so the "Downloading 0%" text overlaps to the seeds column (only in ff @ windows)
Post Reply