1.2.0rc3 Execute Clarification
1.2.0rc3 Execute Clarification
I'm working on getting my script ready to run upon torrent completion and was looking into the parameters passed to the script through the execute plugin. I already searched the forums and found the parameters that get passed at this point; $TORRENT_ID, $TORRENT_NAME, and $TORRENT_PATH. I just wanted to clarify what $TORRENT_PATH actually returned. For instance, does it return the value in quotes? (ie, "/media/DriveA/Downloads") Does it return the path minus the file name or is included as well? I plan on testing this when I get a copy of 1.2.0rc3 running, I just haven't gotten that far yet and figured I'd check here in the meantime. Thanks.
Re: 1.2.0rc3 Execute Clarification
Why not test it? Have your script print out the 3 arguments.existsec wrote:I'm working on getting my script ready to run upon torrent completion and was looking into the parameters passed to the script through the execute plugin. I already searched the forums and found the parameters that get passed at this point; $TORRENT_ID, $TORRENT_NAME, and $TORRENT_PATH. I just wanted to clarify what $TORRENT_PATH actually returned. For instance, does it return the value in quotes? (ie, "/media/DriveA/Downloads") Does it return the path minus the file name or is included as well? I plan on testing this when I get a copy of 1.2.0rc3 running, I just haven't gotten that far yet and figured I'd check here in the meantime. Thanks.
Code: Select all
#!/usr/bin/python
import sys
for arg in sys.argv[1:]:
print arg
Re: 1.2.0rc3 Execute Clarification
That's what I was going to do. Just been held up trying to figure out why Mythnettv is extremely picky about the arguments passed to it. Without fixing that my script is pretty much moot. Just taking it in steps at this point. Was just wondering if anyone knew offhand before I tested it myself.
Re: 1.2.0rc3 Execute Clarification
You could always take a peek at the source code for the plugin.existsec wrote:That's what I was going to do. Just been held up trying to figure out why Mythnettv is extremely picky about the arguments passed to it. Without fixing that my script is pretty much moot. Just taking it in steps at this point. Was just wondering if anyone knew offhand before I tested it myself.
Re: 1.2.0rc3 Execute Clarification
That's my next step. Just got this error when adding a command to execute on torrent added in order to test the output. I've only been able to take a quick peak in the code just yet. Planning on spending more time on that tonight.
Code: Select all
[ERROR ] 15:13:15 client:375 RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: execute.save_command(d087a392f00e122c9ac689f002e8493f628aa1ef, added, executetest)
--------------------------------------------------------------------------------
File "/usr/lib/pymodules/python2.6/deluge/core/rpcserver.py", line 281, in dispatch
ret = self.factory.methods[method](*args, **kwargs)
File "/usr/share/pyshared/deluge/plugins/Execute-1.2-py2.6.egg/execute/core.py", line 127, in save_command
command[EXECUTE_EVENT] = event
TypeError: 'tuple' object does not support item assignment
--------------------------------------------------------------------------------
Unhandled error in Deferred:
Traceback (most recent call last):
Failure: deluge.ui.client.DelugeRPCError: <deluge.ui.client.DelugeRPCError object at 0x2bcef10>