Ubuntu / Filebot / rtorrent issue

Support for Ubuntu and other Desktop Linux distributions
Post Reply
TwilightZone
Posts: 3
Joined: 12 Dec 2016, 23:59

Ubuntu / Filebot / rtorrent issue

Post by TwilightZone »

Just did a clean install of the following:
Ubuntu 16.04
filebot 4.7.5 / oracle java 8.0
rtorrent 9.6 rutorrent 3.7

rtorrent.rc
system.method.set_key=event.download.finished,filebot_amc,"execute={/media/Extras/Videos/renamer.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1}"

renamer.sh
#!/bin/bash
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

filebot -script fn:amc --action move --conflict override -non-strict --def clean=y --def "movieFormat=/media/Extras/Videos/Movies/{n.upperInitial().space('.')}.({y})" "seriesFormat=/media/Extras/Videos/Shows.to.Watch/{n.upperInitial().space('.')}.{s00e00}.{t.upperInitial().space('.')}" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" &


Now I can trigger it manually by dropping from the ut_dir= on and giving the script my torrent folder location but rtorrent doesn't appear to like it I get this every time it completes.

Event 'event.download.finished' failed: Bad return code.

Anyone have any thought? Also a huge shout out to the dev on this it is one hell of an app thank you.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Ubuntu / Filebot / rtorrent issue

Post by rednoah »

Did you confirm if uTorrent calls your script?

Did you confirm that your script (successfully) calls filebot?


Please read the Shell Script Debugging for Beginners guide.
:idea: Please read the FAQ and How to Request Help.
TwilightZone
Posts: 3
Joined: 12 Dec 2016, 23:59

Re: Ubuntu / Filebot / rtorrent issue

Post by TwilightZone »

I'm using rtorrent not utorrent. rtorrent is calling it I see the error in the rtorrent cli logs for it.
Event 'event.download.finished' failed: Bad return code.
^^ That is the attempt on finish for torrents but it says it is returning bad code. The only mention I see of that error while google searching related to having whitespaces in the command which I don't have. The script itself will run in terminal if I edit in a path and remove the other calls from the end for directories that are passed from rtorrent.


filebot -script fn:amc --action move --conflict override -non-strict --def clean=y --def "movieFormat=/media/Extras/Videos/Movies/{n.upperInitial().space('.')}.({y})" "seriesFormat=/media/Extras/Videos/Shows.to.Watch/{n.upperInitial().space('.')}.{s00e00}.{t.upperInitial().space('.')}"

This would lead me to think the .rtorrent.rc call is wrong or something about how the script is setup can't be run that way.

system.method.set_key=event.download.finished,filebot_amc,"execute={/media/Extras/Videos/renamer.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1}"

It is chmod +x and all folders are owned by the right user / have execute permission .
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Ubuntu / Filebot / rtorrent issue

Post by rednoah »

Since you didn't provide any proof to the contrary, I will assume that your script isn't working. .

Please follow this guide to find out where things go wrong:
viewtopic.php?t=3067
:idea: Please read the FAQ and How to Request Help.
TwilightZone
Posts: 3
Joined: 12 Dec 2016, 23:59

Re: Ubuntu / Filebot / rtorrent issue

Post by TwilightZone »

adding those lines into the script didn't do anything nor output a log file
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Ubuntu / Filebot / rtorrent issue

Post by rednoah »

So you have confirmed that your script is never even called by rtorrent? In that case you will need to find some rtorrent experts on their forums or the rtorrent subreddit.

Unfortunately, I can't provide in-depth support for software other than FileBot.
:idea: Please read the FAQ and How to Request Help.
Post Reply