Can't run external program
Can't run external program
I'm trying to use FileBot to process videos after they're downloaded, but as far as I can tell the "Run an external program on torrent completion" option just doesn't do anything. I've tried a whole bunch of different variations (down to "echo foo >> ~/debug.txt"), and I can't see any effect. Am I missing something?
Re: Can't run external program
Sorry, it's 3.2.5 running on Mac OS X 10.9.5. It's an old machine, so I'd prefer not to upgrade the OS unless there's a compelling reason to.
Re: Can't run external program
Okay,
Maybe just the way you typed it here, but is "echo foo >> ~/debug.txt" a literal copy from the options -> downloads dialogue (including the quotes)?
Maybe just the way you typed it here, but is "echo foo >> ~/debug.txt" a literal copy from the options -> downloads dialogue (including the quotes)?
Re: Can't run external program
I've tried a bunch of different things, but no, there were no quotes. Here's what I have at the moment:
filebot -script fn:amc --output "/Users/asher/Media" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y excludeList=amc.txt "%f"
Regardless of what I enter, though, it seems like the command just doesn't get run.
filebot -script fn:amc --output "/Users/asher/Media" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y excludeList=amc.txt "%f"
Regardless of what I enter, though, it seems like the command just doesn't get run.
Re: Can't run external program
Update: I went back and retried this command (copied and pasted from the entry field), just to be sure:
echo foo >> ~/debug.txt
I then downloaded a test file, and the debug.txt file does not contain the word "foo" as expected.
echo foo >> ~/debug.txt
I then downloaded a test file, and the debug.txt file does not contain the word "foo" as expected.
Last edited by aaronsher on Sat Nov 28, 2015 5:36 pm, edited 1 time in total.
Re: Can't run external program
Was debug.txt created at that point or did it already exist?
Re: Can't run external program
It already existed. And I ran the same command on the command line to prove that I didn't mistype it somehow.
Re: Can't run external program
Any thoughts on this? Is there an official support channel I can use? I assume this feature isn't entirely broken for everybody, so it's presumably something about my setup.
Re: Can't run external program
This is the "official support channel", what is needed is another Mac user, I'm running 3.3.0 on Linux triggering a python script that logs the time and dates that tasks complete that has no problems.
The script is below if you want to give it a try.
saved as qbt-log.py ( chmod +x to mark it as executable code)
and the command line is:
Change the paths to suit your system, I have all my utility scripts in /home/scripts/ so some can run without me logged in.
The script is below if you want to give it a try.
saved as qbt-log.py ( chmod +x to mark it as executable code)
Code: Select all
#!/usr/bin/python
import sys
import time
# change the path to suit your user name
logfile = open("/home/chris/qbt-completed","a")
logfile.write(str("\n"))
logfile.write(time.strftime("%a")+"\t")
logfile.write(time.strftime("%d")+"/")
logfile.write(time.strftime("%b")+"/")
logfile.write(time.strftime("%Y")+"\t")
logfile.write(time.strftime("%H")+":")
logfile.write(time.strftime("%M")+"\t")
# write CL arguments to file
if (sys.argv[1]):
logfile.write(str(sys.argv[1]))
else:
logfile.write(str(sys.argv[2]))
logfile.close()
Code: Select all
/home/scripts/qbt-log.py "%F" "%D/"
Re: Can't run external program
Thanks - I don't think it's going to make a difference, since I'm 99% certain that it's not even reading the command line I enter, but I've gone ahead and set it up to call your script (with appropriate path changes) anyway. I've verified that I can call the script manually. Unfortunately, I'm having a separate problem at the moment (index.php/topic,4008.0.html) that's going to prevent me from testing this until it's resolved.
Re: Can't run external program
I've had endless problems with qbittorrent being unstable, but it does in fact appear to be calling the Python script. It's not obvious why this would be different than the ten different shell scripts I've tried, but it is.