Filebot AMC with rtorrent on Synology not executed

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
agglo
Posts: 2
Joined: 25 Jan 2015, 08:56

Filebot AMC with rtorrent on Synology not executed

Post by agglo »

Hi,

first I have to say: amazing piece of software. I'm very new to this whole topic but enjoying it a lot already...

I am trying to get filebot_amc running on my Synology NAS so that upon completion of a rtorrent download it will be triggered to copy the media to my library (while the torrent keeps seeding). For starters just with one label/directory (Episodes), later on I wish to add a few more (Movies, Seeds). Fairly standard stuff I guess.

I think I am very close, but one bit is failing - this is what happens:
Whenever a download finishes, rtorrent tries to execute filebot, but for some reason nothing happens (no entry in amc.log).
Rtorrent execute log shows the proper code but it is not executed. Now, if I copy/paste the code from rtorrent log and manually run it in ssh (with 'sh' prefix) it works, filebot will act as instructed in my filebot-postprocess.

I've been trying to figure this out for days, maybe someone knows the issue / can help me to sort it out. Any help is greatly appreciated..!
(As you might have realized by now, I'm not very skilled at this - I'm learning a lot right now :) )

rtorrent config:

Code: Select all

scgi_port = 127.0.0.1:5050
log.execute=/root/rtorrent_exec.log
execute = {sh,-c,/usr/bin/php /opt/share/www/rutorrent/php/initplugins.php &}
system.method.set_key=event.download.finished,filebot_amc,"execute={/opt/etc/rtorrent-postprocess,$d.get_base_path=,$d.get_name=,$d.get_cu
rtorrent-postprocess:

Code: Select all

#!/bin/bash
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3
filebot -script fn:amc --output "/volume2/MediaMaster" --log-file amc.log --action copy -non-strict --def music=y --def "seriesFormat=/volume2/MediaMaster/Shows/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "ut_dir=TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &
rtorrent-postprocess execution rights (currently everything's running from root):

Code: Select all

-rwxrwxrwx 1 root root 354 2015-01-25 00:42 /opt/etc/rtorrent-postprocess
rtorrent execute log:

Code: Select all

/opt/etc/rtorrent-postprocess /volume2/MyPath/Download/_Episodes/MyDownloadName Episodes
(MyPath and MyDownloadName were shortened/replaced for use here; Episodes is the label I use for now)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot AMC with rtorrent on Synology not executed

Post by rednoah »

If there's no log then filebot is not called. When rtorrent calls a script it may not necessary have the same environment variables set. My guess is that "filebot" or "java" are simply not in the PATH (when the script is called from rtorrent).
:idea: Please read the FAQ and How to Request Help.
agglo
Posts: 2
Joined: 25 Jan 2015, 08:56

Re: Filebot AMC with rtorrent on Synology not executed

Post by agglo »

Thanks for pointing me in the right direction.
In fact, it was a combination of missing PATH (in /etc/profile) and autotools plugin (automove caused filebot not to find the files).
I'll have to do some more fiddling with automove and filebot variables, but it basically works now.
Happy as a camper :)
Post Reply