[Plugin] ltConfig v2.0.0

Suggest, post, or discuss plugins for Deluge
Post Reply
fgero
New User
New User
Posts: 3
Joined: Thu Feb 12, 2015 4:15 pm

Re: [Plugin] libtorrent Config v0.2.4.0

Post by fgero »

Hello,

I'm having trouble launching the plugin I get this on the daemon logs :

Code: Select all

[ERROR   ] 17:01:08 pluginmanagerbase:146 Unable to instantiate plugin!
[ERROR   ] 17:01:08 pluginmanagerbase:147 No module named libtorrent
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/pluginmanagerbase.py", line 144, in enable_plugin
    instance = cls(plugin_name.replace("-", "_"))
  File "/root/.config/deluge/plugins/ltConfig-0.2.4.0-py2.7.egg/ltconfig/__init__.py", line 46, in __init__
    from core import Core as _plugin_cls
  File "/root/.config/deluge/plugins/ltConfig-0.2.4.0-py2.7.egg/ltconfig/core.py", line 45, in <module>
ImportError: No module named libtorrent
Libtorrent was built during the deluge build and not installed as a python module and I guess the issue comes from here, I don't know python so I have no idea how to make the plugin recognize the libtorrent that is located here :

Code: Select all

root@vagrant:/var/log/deluge/web# ll /usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/*libtorrent*
-rwxr-xr-x 1 root staff     2017 Feb 12 14:38 /usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/_libtorrent.py
-rwxr-xr-x 1 root staff      280 Feb 12 14:38 /usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/libtorrent.py
-rw-r--r-- 1 root staff     1002 Feb 12 14:38 /usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/_libtorrent.pyc
-rw-r--r-- 1 root staff      644 Feb 12 14:38 /usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/libtorrent.pyc
-rwxr-xr-x 1 root staff 91810620 Feb 12 14:38 /usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7-linux-x86_64.egg/deluge/libtorrent.so
Ratanak
Leecher
Leecher
Posts: 98
Joined: Sat Dec 22, 2012 4:47 am

Re: [Plugin] libtorrent Config v0.2.4.0

Post by Ratanak »

fgero wrote:Libtorrent was built during the deluge build and not installed as a python module and I guess the issue comes from here, I don't know python so I have no idea how to make the plugin recognize the libtorrent that is located here...
Your guess is correct. The plugin assumes that you have libtorrent and its python bindings installed and imports libtorrent directly. This a mistake. The plugin should really be using whatever it is that Deluge uses. I will fix this, but for now, if you can build the plugin from source or you know how to unpack/repack eggs, you could edit core.py, replacing:

Code: Select all

import libtorrent
with:

Code: Select all

from deluge._libtorrent import lt as libtorrent
fgero
New User
New User
Posts: 3
Joined: Thu Feb 12, 2015 4:15 pm

Re: [Plugin] libtorrent Config v0.2.4.0

Post by fgero »

Thanks It's working with your fix :!:
Ratanak
Leecher
Leecher
Posts: 98
Joined: Sat Dec 22, 2012 4:47 am

Re: [Plugin] libtorrent Config v0.2.4.1

Post by Ratanak »

Update to version 0.2.4.1.
ryd994

Re: [Plugin] libtorrent Config v0.2.4.1

Post by ryd994 »

Feature Request: Could you add dht settings also?
Could you add options for libtorrent.set_dht_settings()
ref: http://www.libtorrent.org/reference-Set ... t-settings
Ratanak
Leecher
Leecher
Posts: 98
Joined: Sat Dec 22, 2012 4:47 am

Re: [Plugin] libtorrent Config v0.2.4.1

Post by Ratanak »

ryd994 wrote:Feature Request: Could you add dht settings also?
I'll look into implementing this.
Ratanak
Leecher
Leecher
Posts: 98
Joined: Sat Dec 22, 2012 4:47 am

Re: [Plugin] ltConfig v0.2.5.0

Post by Ratanak »

Update to version 0.2.5.0.

Now supports modification of DHT settings. Only supported on a future version of libtorrent (maybe 1.0.6) or a version built from the latest trunk or RC_1_0 branch. DHT settings appear in the settings list prefixed with "dht."
zosky
New User
New User
Posts: 2
Joined: Wed Jun 17, 2015 10:35 pm

Re: [Plugin] ltConfig v0.2.5.0

Post by zosky »

this has to be my favourite plugin. thank you !!! tweaking the native settings (like active-up & down) then restarting delugeD got old pretty quick.

that said, it keeps reverting. i've applied high performance preset + made a few tweaks of my own ... then a few hours later its back to "normal" ... open config, hit apply... wash rinse and repeat every few hours... thats getting pretty old quickly :?

what gives ? how do i make the changes sticky ?
Shryp
Moderator
Moderator
Posts: 521
Joined: Mon Apr 20, 2015 10:20 pm

Re: [Plugin] ltConfig v0.2.5.0

Post by Shryp »

My changes are staying. Do you have apply on startup checked? Maybe something is crashing the daemon on your system and it is auto restarting?
zosky
New User
New User
Posts: 2
Joined: Wed Jun 17, 2015 10:35 pm

Re: [Plugin] ltConfig v0.2.5.0

Post by zosky »

i do now. we'll see
BT'dubs; it dosn't seem to be restarting (since i did it anyway)

is there somewhere i could be looking to see what libTor is doing ?

Code: Select all

 ps -p 29386 -o etime 
    ELAPSED
   18:29:23
Post Reply