Git Product home page Git Product logo

deluge_framework's People

Contributors

backslasher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

deluge_framework's Issues

connect params questions

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'

v2 deluge

Hey there, just curious if you are considering migrating this to v2.0.3 ?

Passed value issue

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)))

ERROR:deluge.ui.client:RPCError Message Received!

RPCRequest: core.queue_top(0fe7ff85027e9c6e5d4248483f4663160435fee9)

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'

Clarification

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?

Exception 'save_path'

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.