Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Deluge 2.0 #17

Open
SeriousHoax opened this issue Jan 2, 2019 · 28 comments
Open

Support for Deluge 2.0 #17

SeriousHoax opened this issue Jan 2, 2019 · 28 comments

Comments

@SeriousHoax
Copy link

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

@ratanakvlun
Copy link
Owner

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

@SeriousHoax
Copy link
Author

Alright then. Glad to know you have the plan.

@mhertz
Copy link

mhertz commented Mar 25, 2019

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
Copy link

Would also love to see this happen.

@perfect7gentleman
Copy link

perfect7gentleman commented Jun 9, 2019

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

@SeriousHoax
Copy link
Author

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

@ratanakvlun
Copy link
Owner

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

@perfect7gentleman
Copy link

perfect7gentleman commented Jun 9, 2019

@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
Copy link
Author

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
Copy link

riaqn commented Jun 29, 2019

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

@ratanakvlun
Copy link
Owner

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

@JoshDi
Copy link

JoshDi commented Jul 8, 2019

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
Copy link

riaqn commented Jul 8, 2019

@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
Copy link

riaqn commented Jul 8, 2019

@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
Copy link

JoshDi commented Jul 8, 2019

@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
Copy link

riaqn commented Jul 8, 2019

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
Copy link

JoshDi commented Jul 8, 2019

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
Copy link

riaqn commented Jul 8, 2019

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
Copy link

JoshDi commented Jul 8, 2019

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
Copy link

riaqn commented Jul 8, 2019

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
Copy link

riaqn commented Jul 8, 2019

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
Copy link

JoshDi commented Jul 8, 2019

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
Copy link

mhertz commented Jul 9, 2019

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
Copy link

$ 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
Copy link

labor4 commented Aug 7, 2019

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

@ratanakvlun
Copy link
Owner

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
Copy link
Owner

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

@perfect7gentleman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants