Can't run external program

MAC OS X specific questions, problems.
Post Reply
aaronsher

Can't run external program

Post by aaronsher »

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?
ciaobaby

Re: Can't run external program

Post by ciaobaby »

We are missing what client version you are using.
aaronsher

Re: Can't run external program

Post by aaronsher »

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.
ciaobaby

Re: Can't run external program

Post by ciaobaby »

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

Re: Can't run external program

Post by aaronsher »

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.
aaronsher

Re: Can't run external program

Post by aaronsher »

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.
Last edited by aaronsher on Sat Nov 28, 2015 5:36 pm, edited 1 time in total.
ciaobaby

Re: Can't run external program

Post by ciaobaby »

Was debug.txt created at that point or did it already exist?
aaronsher

Re: Can't run external program

Post by aaronsher »

It already existed. And I ran the same command on the command line to prove that I didn't mistype it somehow.
aaronsher

Re: Can't run external program

Post by aaronsher »

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.
ciaobaby

Re: Can't run external program

Post by ciaobaby »

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)

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()
and the command line is:

Code: Select all

/home/scripts/qbt-log.py "%F"  "%D/"
Change the paths to suit your system,  I have all my utility scripts in /home/scripts/ so some can run without me logged in.
aaronsher

Re: Can't run external program

Post by aaronsher »

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.
aaronsher

Re: Can't run external program

Post by aaronsher »

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.
Post Reply