backslasher / deluge_framework Goto Github PK
View Code? Open in Web Editor NEWA framework for manipulating deluge remotely
License: GNU General Public License v2.0
A framework for manipulating deluge remotely
License: GNU General Public License v2.0
Using this connect line in the code, i get the following error
cliconnect = client.connect({"host":"localhost", "port":58847, "username":"myuser","password":"mypass"})
File "/opt/deluge.blackpron.py", line 335, in <module>
filter_torrents({},['name','state','progress','total_size','label'],torrentAction)
File "/opt/code/deluge_frameworkpron/deluge_frameworkpron.py", line 145, in filter_torrents
cliconnect = client.connect({"host":"localhost", "port":58847, "username":"master", "password":"maxxdark"})
File "/opt/deluge/deluge/ui/client.py", line 548, in connect
d = self._daemon_proxy.connect(host, port)
File "/opt/deluge/deluge/ui/client.py", line 267, in connect
ssl.ClientContextFactory())
File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 508, in connectSSL
return self.connectTCP(host, port, tlsFactory, timeout, bindAddress)
File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 499, in connectTCP
c = tcp.Connector(host, port, factory, timeout, bindAddress, self)
File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 1164, in __init__
if abstract.isIPv6Address(host):
File "/usr/lib64/python2.7/site-packages/twisted/internet/abstract.py", line 546, in isIPv6Address
return isIPAddress(addr, AF_INET6)
File "/usr/lib64/python2.7/site-packages/twisted/internet/abstract.py", line 516, in isIPAddress
addr = addr.split(u"%", 1)[0]
AttributeError: 'dict' object has no attribute 'split'
Hey there, just curious if you are considering migrating this to v2.0.3 ?
Hey There,
I'm extending your code to do some of the other stuff that I talked to you about previous and running into an odd issue. Trying to manage jobs in the queue, so 'category = first, queue to top' and its doing this odd thing where the RPC error shows the full value for the passed torrent_id but gives a key error of u''. Not sure why, its looks the same as the others and they don't have issues.
Initially, it complained about the number of arguments so I removed the boolean and just pass the torrent_id as per the docs at http://deluge.readthedocs.io/en/develop/core/rpc.html.
Any help would be appreciated.
successmsg = "%s [%s]: Deleted without data" % (torrent_id, torrent_info['name'])
errormsg = "%s [%s]: Error deleting without data" % (torrent_id, torrent_info["name"])
tlist.append(client.core.queue_top(torrent_id).addCallbacks(printSuccess, printError, callbackArgs = (True, successmsg), errbackArgs = (errormsg)))
KeyError
u'0': Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/deluge-2.0b2.dev43-py2.7.egg/deluge/core/rpcserver.py", line 302, in dispatch
ret = self.factory.methods[method](*args, **kwargs)
File "/usr/lib/python2.7/site-packages/deluge-2.0b2.dev43-py2.7.egg/deluge/core/core.py", line 975, in queue_top
for torrent_id in sorted(torrent_ids, key=self.torrentmanager.get_queue_position, reverse=True):
File "/usr/lib/python2.7/site-packages/deluge-2.0b2.dev43-py2.7.egg/deluge/core/torrentmanager.py", line 963, in get_queue_position
return self.torrents[torrent_id].get_queue_position()
KeyError: u'0'
So i'm trying to recreate some scripting I had for uTorrent with Deluge, where i have files of text phrases that I convert to regex, then manipulate the torrent list.
I'm trying to figure out how to leverage your code, as it seems to be at least partway to what I need.
I have a blacklist, a whitelist, and category based lists.
in the code, there are multiple actions
I have a blacklist, a whitelist, and category based lists.
in the code, there are multiple actions
Loop through torrent list:
Loop through tvlist:
if <tv regex> and size > x:
delete torrent
Loop through each lable phrase list:
if <any label key> in tname:
assign label
Loop through blacklist phrases:
if <blacklist phrase> in tname:
loop through whitelist phrases:
if no matches in whitelist, delete torrent
Any pointers on how to accomplish this?
Because we cannot export label info from deluge, I was trying to export the save path: if save_path = .../movies then watch=.../watch/movies
if torrent_info['save_path'] == path1:
watch == watch1
elif torrent_info['save_path'] == path2:
watch == watch2
elif torrent_info['save_path'] == path3:
watch == watch3
elif torrent_info['save_path'] == path4:
watch == watch4
It keeps throwing up the error in the title. It's probably just a silly mistake, but I hoped that my attempt might inspire others.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.