Page 1 of 1

Issue running filebot via uTorrent

Posted: 15 Dec 2013, 11:09
by Adz0rd
Hi,

Whenever uTorrent tries to run filebot, stderr returns "No such file or directory.", however if i run the script manually, it executes perfectly...

Script:
#!/bin/bash
TORRENT_NAME=$1
TORRENT_PATH=$2
TORRENT_LABEL=$3
TORRENT_KIND=$4
TORRENT_TITLE=$5

filebot -script fn:amc --output "/mnt/Storage/" --log-file "amc.log" --action move --conflict override -non-strict --def music=n subtitles=en artwork=n xbmc="192.168.0.123" deleteAfterExtract=y clean=y "ut_dir=$TORRENT_PATH" "ut_file=$TORRENT_NAME" "ut_kind=$TORRENT_KIND" "ut_title=$TORRENT_TITLE" "ut_label=$TORRENT_LABEL" "ut_state=5" "seriesFormat=TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}" "movieFormat=Movies/{n} ({y})/{n} ({y})" &>> /home/xbmc/run.log

I originally had filebot executing straight from the uTorrent "Run Program" section, however that wasn't working and it wasnt giving me any errors etc...

Here is a line from the uTorrent log file:
[20131115 18:44:27] Executing: /home/xbmc/run.sh "Supernatural.S09E08.720p.HDTV.X264-DIMENSION.mkv" "/mnt/Storage/Downloads/Complete/TV" "TV" "single" "Supernatural.S09E08.720p.HDTV.X264-DIMENSION.mkv"

Any idea on how to fix it?

It's weird because it only doesnt work when being executed via uTorrent, works fine if i copy the "Executing: " command and run it, it works fine...

Re: Issue running filebot via uTorrent

Posted: 15 Dec 2013, 12:40
by rednoah
bash environment is probably different

the easiest fix is to just use the absolute path to the filebot.sh launcher rather than relying on the PATH to find filebot.

Re: Issue running filebot via uTorrent

Posted: 15 Dec 2013, 12:48
by Adz0rd
Yeah i tried that:

#!/bin/bash
TORRENT_NAME=$1
TORRENT_PATH=$2
TORRENT_LABEL=$3
TORRENT_KIND=$4
TORRENT_TITLE=$5

/usr/share/filebot/bin/filebot.sh -script fn:amc --output "/mnt/Storage/" --log-file "amc.log" --action move --conflict override -non-strict --def music=n subtitles=en artwork=n xbmc="192.168.0.123" deleteAfterExtract=y clean=y "ut_dir=$TORRENT_PATH" "ut_file=$TORRENT_NAME" "ut_kind=$TORRENT_KIND" "ut_title=$TORRENT_TITLE" "ut_label=$TORRENT_LABEL" "ut_state=5" "seriesFormat=TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}" "movieFormat=Movies/{n} ({y})/{n} ({y})" &>> /home/xbmc/run.log

Also didn't work...

Re: Issue running filebot via uTorrent

Posted: 15 Dec 2013, 13:00
by Adz0rd
Also, how can it be the BASH environment path when if its run manually, it executes fine...

Re: Issue running filebot via uTorrent

Posted: 15 Dec 2013, 14:00
by rednoah
Because when manually it executes as your user and when utorrent executes it it may be a different user? Or because utorrent specifies a different .bash.rc or just doesn't use the .bash.rc that is used when you run manually?

Are you sure your script even starts? Maybe utorrent can't even access your xbmc.sh script for some reason. No permissions, not executable, etc

Or you sure utorrent even uses bash to run your command? It my use sh and not bash.