ratanakvlun / deluge-ltconfig

293 stars 35 forks source link

Support for Deluge 2.0 #17

Open SeriousHoax opened 5 years ago

SeriousHoax commented 5 years ago

Are you gonna update the plugin to make it compatible with Deluge 2.0?

ratanakvlun commented 5 years ago

I do want to at some point, but I've been waiting for a Deluge 2.0 stable release.

SeriousHoax commented 5 years ago

Alright then. Glad to know you have the plan.

mhertz commented 5 years ago

Thank you! I'm sure many like me cannot switch to deluge2 because of this plugin missing, e.g. for enabling high-performance-seed preset or announce_to_all_trackers/tiers etc. etc.

ctlaltdefeat commented 5 years ago

Would also love to see this happen.

perfect7gentleman commented 5 years ago

Deluge 2.0 is officially released. https://deluge.readthedocs.io/en/latest/changelog.html

SeriousHoax commented 5 years ago

@perfect7gentleman I don't see any Windows installer though.

ratanakvlun commented 5 years ago

Well damn, I guess I can't avoid it anymore.

perfect7gentleman commented 5 years ago

@perfect7gentleman I don't see any Windows installer though.

I don't use Windows. https://deluge.readthedocs.io/en/latest/intro/01-install.html

There is no installer package currently for Windows, but can try Deluge as follows. ...

SeriousHoax commented 5 years ago

Is it possible to change the DNS server of Deluge via Itconfig plugin? I use a particular DNS server on my router but want to use another one for my torrent client only. Is it possible?

riaqn commented 5 years ago

@ratanakvlun Do you have plans of doing this soon? We would really appreciate it!

ratanakvlun commented 5 years ago

Need to set up a new development environment but I'm on it.

JoshDi commented 5 years ago

I have forked this release and followed the Deluge plugin migration instructions.

I have a working version of ltConfig for Deluge 2.0.3

Please let me know if you have any issues: ltConfig-0.3.1-py3.6.egg for Deluge 2.3

Link to Git Fork

riaqn commented 5 years ago

@JoshDi That's wonderful! I will try out and let you know.

EDIT: after trial, I think the code is not complete yet - at least not for GTK3 UI. I would suggest others to patiently wait for a complete plugin.

@ratanakvlun maybe you two could work together to avoid duplicated work?

riaqn commented 5 years ago

@JoshDi I assume you meant Deluge 2.0.3 instead of 2.3?

I compiled it myself (because I only have python 3.7 on my system) and it successfully loads. However, there doesn't seem to be UI? I mean, usually after ltConfig is loaded it immediately shows up in settings.

maybe this says something:

Jul 08 10:53:16 house.riaqn.org deluge[31120]: 10:53:16 [ERROR   ][deluge.pluginmanagerbase          :154 ] Unable to instantiate plugin 'ltConfig' from '/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg'!
Jul 08 10:53:16 house.riaqn.org deluge[31120]: 10:53:16 [ERROR   ][deluge.pluginmanagerbase          :1418] No module named 'deluge_ltconfig'
Jul 08 10:53:16 house.riaqn.org deluge[31120]: Traceback (most recent call last):
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/deluge/pluginmanagerbase.py", line 147, in enable_plugin
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     cls = egg.load_entry_point(self.entry_name, name)
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     return ep.load()
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     return self.resolve()
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     module = __import__(self.module_name, fromlist=['__name__'], level=0)
Jul 08 10:53:16 house.riaqn.org deluge[31120]: ModuleNotFoundError: No module named 'deluge_ltconfig'
JoshDi commented 5 years ago

@JoshDi I assume you meant Deluge 2.0.3 instead of 2.3?

I compiled it myself (because I only have python 3.7 on my system) and it successfully loads. However, there doesn't seem to be UI? I mean, usually after ltConfig is loaded it immediately shows up in settings.

maybe this says something:

Jul 08 10:53:16 house.riaqn.org deluge[31120]: 10:53:16 [ERROR   ][deluge.pluginmanagerbase          :154 ] Unable to instantiate plugin 'ltConfig' from '/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg'!
Jul 08 10:53:16 house.riaqn.org deluge[31120]: 10:53:16 [ERROR   ][deluge.pluginmanagerbase          :1418] No module named 'deluge_ltconfig'
Jul 08 10:53:16 house.riaqn.org deluge[31120]: Traceback (most recent call last):
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/deluge/pluginmanagerbase.py", line 147, in enable_plugin
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     cls = egg.load_entry_point(self.entry_name, name)
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     return ep.load()
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     return self.resolve()
Jul 08 10:53:16 house.riaqn.org deluge[31120]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
Jul 08 10:53:16 house.riaqn.org deluge[31120]:     module = __import__(self.module_name, fromlist=['__name__'], level=0)
Jul 08 10:53:16 house.riaqn.org deluge[31120]: ModuleNotFoundError: No module named 'deluge_ltconfig'

Yes, I meant Deluge 2.0.3. I have changed my comment to reflect the correct version.

After installing and checking the ltConfig plugin box, I restarted deluge and I had the ltConfig menu in my WebUI in Deluge

riaqn commented 5 years ago

yeah I didn't mean the webUI - but the native GTK UI. Can you try that please?

I also restarted deluge with no effect.

JoshDi commented 5 years ago

yeah I didn't mean the webUI - but the native GTK UI. Can you try that please?

I also restarted deluge with no effect.

I agree. My plugin that works with Deluge 2.0.3 only shows up on the WebUI. I dont see the plugin menu in settings with the Deluge GTK

riaqn commented 5 years ago

I think I know where the problem is. After running the egg generation, here is ltConfig.egg-info/entry_points.txt


    [deluge.plugin.core]
    ltConfig = ltconfig:CorePlugin
    [deluge.plugin.gtkui]
    ltConfig = ltconfig:GtkUIPlugin
    [deluge.plugin.gtk3ui]
    ltConfig = deluge_ltconfig:Gtk3UIPlugin
    [deluge.plugin.web]
    ltConfig = ltconfig:WebUIPlugin

Obviously the one for gtk3UI is wrong. But I'm not python-savy enough to know how to fix it. It shouldn't be hard.

JoshDi commented 5 years ago

I think I know where the problem is. After running the egg generation, here is ltConfig.egg-info/entry_points.txt


    [deluge.plugin.core]
    ltConfig = ltconfig:CorePlugin
    [deluge.plugin.gtkui]
    ltConfig = ltconfig:GtkUIPlugin
    [deluge.plugin.gtk3ui]
    ltConfig = deluge_ltconfig:Gtk3UIPlugin
    [deluge.plugin.web]
    ltConfig = ltconfig:WebUIPlugin

Obviously the one for gtk3UI is wrong. But I'm not python-savy enough to know how to fix it. It shouldn't be hard.

Updated the release with the changes.

riaqn commented 5 years ago

Changing ltConfig.egg-info wouldn't help because it's overwritten in egg generation. The right way is to change setup.py accordingly. But then new problem arises.

Jul 08 11:16:25 house.riaqn.org deluge[5081]: 11:16:25 [ERROR   ][deluge.pluginmanagerbase          :154 ] Unable to instantiate plugin 'ltConfig' from '/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg'!
Jul 08 11:16:25 house.riaqn.org deluge[5081]: 11:16:25 [ERROR   ][deluge.pluginmanagerbase          :1418] name 'GtkUI' is not defined
Jul 08 11:16:25 house.riaqn.org deluge[5081]: Traceback (most recent call last):
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/usr/lib/python3.7/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     instance = cls(plugin_name.replace('-', '_'))
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg/ltconfig/__init__.py", line 62, in __init__
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     super(Gtk3UIPlugin, self).__init__(plugin_name)
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/usr/lib/python3.7/site-packages/deluge/plugins/init.py", line 24, in __init__
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     self.plugin = self._plugin_cls(plugin_name)  # pylint: disable=not-callable
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg/ltconfig/gtk3ui.py", line 76, in __init__
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     super(GtkUI, self).__init__(plugin_name)
Jul 08 11:16:25 house.riaqn.org deluge[5081]: NameError: name 'GtkUI' is not defined

@JoshDi Have you finished the part for gtk3? Or is it still a work in progress?

riaqn commented 5 years ago

So after several fixes, I decided that I don't have time for this and hope other people could carry on. The error I'm currently having is

Jul 08 11:31:57 house.riaqn.org deluge[6981]: Traceback: <class 'AttributeError'>: 'gi.repository.Gtk' object has no attribute 'glade'
Jul 08 11:31:57 house.riaqn.org deluge[6981]: /usr/lib/python3.7/site-packages/twisted/internet/defer.py:151:maybeDeferred
Jul 08 11:31:57 house.riaqn.org deluge[6981]: /usr/lib/python3.7/site-packages/deluge/plugins/init.py:27:enable
Jul 08 11:31:57 house.riaqn.org deluge[6981]: /mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg/ltconfig/gtk3ui.py:84:enable
Jul 08 11:31:57 house.riaqn.org deluge[6981]: /usr/lib/python3.7/site-packages/gi/overrides/__init__.py:32:__getattr__
Jul 08 11:31:57 house.riaqn.org deluge[6981]: /usr/lib/python3.7/site-packages/gi/module.py:132:__getattr__

Obviously there is something to do to port gtk2 to gtk3.

JoshDi commented 5 years ago

Changing ltConfig.egg-info wouldn't help because it's overwritten in egg generation. The right way is to change setup.py accordingly. But then new problem arises.

Jul 08 11:16:25 house.riaqn.org deluge[5081]: 11:16:25 [ERROR   ][deluge.pluginmanagerbase          :154 ] Unable to instantiate plugin 'ltConfig' from '/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg'!
Jul 08 11:16:25 house.riaqn.org deluge[5081]: 11:16:25 [ERROR   ][deluge.pluginmanagerbase          :1418] name 'GtkUI' is not defined
Jul 08 11:16:25 house.riaqn.org deluge[5081]: Traceback (most recent call last):
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/usr/lib/python3.7/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     instance = cls(plugin_name.replace('-', '_'))
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg/ltconfig/__init__.py", line 62, in __init__
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     super(Gtk3UIPlugin, self).__init__(plugin_name)
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/usr/lib/python3.7/site-packages/deluge/plugins/init.py", line 24, in __init__
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     self.plugin = self._plugin_cls(plugin_name)  # pylint: disable=not-callable
Jul 08 11:16:25 house.riaqn.org deluge[5081]:   File "/mnt/riaqn/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg/ltconfig/gtk3ui.py", line 76, in __init__
Jul 08 11:16:25 house.riaqn.org deluge[5081]:     super(GtkUI, self).__init__(plugin_name)
Jul 08 11:16:25 house.riaqn.org deluge[5081]: NameError: name 'GtkUI' is not defined

@JoshDi Have you finished the part for gtk3? Or is it still a work in progress?

clearly this is a work in progress.....

mhertz commented 5 years ago

Just wanted to say thank you so much JoshDi :) Sorry, I haven't tested the GTK3 stuff, because I just use deluge-console/deluged with a premade ltconfig.conf file(I have backed up and just manually add or delete lines in if/when needed), and this works fine i've just tested.

Btw, if you ever have time/motivation, then alot of us would strongly appreciate if you could likewise update labelplus plugin, also from Ratanakvlun here, and probably the most popular plugin i'd guess in addition to this here and yarss2 probably.

Thanks again!

perfect7gentleman commented 5 years ago
$ deluge-gtk 
GLib-GIO-Message: 12:39:24.024: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
12:39:24 [ERROR   ][deluge.pluginmanagerbase          :154 ] Unable to instantiate plugin 'ltConfig' from '/home/perfect_gentleman_007/.config/deluge/plugins/ltConfig-0.3.1-py3.7.egg'!
12:39:24 [ERROR   ][deluge.pluginmanagerbase          :1418] No module named 'deluge_ltconfig'
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/deluge/pluginmanagerbase.py", line 147, in enable_plugin
    cls = egg.load_entry_point(self.entry_name, name)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'deluge_ltconfig'
labor4 commented 5 years ago

maybe somebody wants to give this a shot: https://github.com/JoshDi/deluge-ltconfig/pull/1 I cannot tell since I'm on a buggy system...

ratanakvlun commented 5 years ago

Great job, guys. Things are a bit busy here so I haven't had a good chance to work on this. Keep up the good work.

ratanakvlun commented 5 years ago

Hmm, tried out your guys stuff and it's not quite working. I'll take a look.

perfect7gentleman commented 4 years ago

maybe somebody wants to give this a shot: JoshDi#1 I cannot tell since I'm on a buggy system...

Thanx. It works very good.