FileBot AMC not working

http://www.filebot.net/forums/viewtopic.php?t=215

Can anyone help me with my final step? I’m trying to get this setup with rtorrent.

All I have done was the commands on the page. Do I need to set anything up in rtorrent? Change the default download path?

Do I need to create folders for filebot to autosort?

Thanks!

Did you restart rtorrent after editing the .rtorrent.rc?

I have it working on both of my systems.

In my case I have my script in a scripts subdir off of my users dir and I have edited my .rtorrent.rc to call it. I believe I needed the .rtorrent.rc entry in that specific location and not at the end of the file.

you’ll need to replace my_user in these with your user name and remove the .txt on the end and chmod +x the .sh file.

What these will do is place the processed files in /home/my_user/torrents/rtorrent/complete/tv and /home/my_user/torrents/rtorrent/complete/movies respectively. It will hardlink so the torrents can still seed.

edit: those directories need to exist. It will not create them on the fly.

I would Reload the services in the panel after making the changes.

.rtorrent.rc.txt (967 Bytes)

rtorrent-postprocess.sh.txt (604 Bytes)

1 Like

Hello, i’m setting up my Quickbox,
I manage to make Filebot work properly on my own account,
but when i try to use it with other users it doesn’t work
This i what i’ve done.

#DL Filebot
cd /tmp
wget https://sourceforge.net/projects/filebot/files/filebot/FileBot_4.7.2/FileBot_4.7.2-portable.zip/download
unzip download -d filebot && rm -f download
cp -R filebot /home/jordan/.filebot
chown -R jordan:jordan /home/jordan/.filebot
chmod a+x /home/jordan/.filebot/filebot.sh
chmod a+x /home/jordan/.filebot/update-filebot.sh

#Post Process
mkdir /home/jordan/media
mkdir /home/jordan/media/tvshows
mkdir /home/jordan/media/movies
mkdir /home/jordan/media/music
mkdir /home/jordan/scripts
chown -R jordan:jordan /home/jordan/media
chown -R jordan:jordan /home/jordan/scripts
chmod -R 755 /home/jordan/media
chmod -R 755 /home/jordan/scripts
nano /home/jordan/scripts/rtorrent-postprocess.sh

##Begin
#!/bin/sh

# rtorrent.rc
# system.method.set_key=event.download.finished,filebot,"execute={/home/jordan/scripts/rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/home/jordan/media"

sh /home/jordan/.filebot/filebot.sh --lang fr -script fn:amc --output "$CONFIG_OUTPUT" --action symlink --conflict override -non-strict --log-file amc.log --def plex=localhost:QLxXdb3aoYxV4ivyQhvuR --def unsorted=y music=y artwork=y ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" --def "seriesFormat=tvshows/{n}/{'Season '+s}/{fn}" "movieFormat=movies/{ny}/{fn}" "musicFormat=music/{albumartist}/{album}/{t}" &
##End

#Option: --def plex=localhost:[token] --def subtitles=fr,en
chown jordan:jordan /home/jordan/scripts/rtorrent-postprocess.sh
chmod a+x /home/jordan/scripts/rtorrent-postprocess.sh

#Rtorrent.rc#
nano /home/jordan/.rtorrent.rc
#Add the line
system.method.set_key=event.download.finished,filebot,"execute={/home/jordan/scripts/rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
#Refresh Rtorrent in dashboard           

How can i fix permission to execute it ?

So you’re putting filebot in /home/jordan/.filebot, correct?

If you follow the instructions for installing it on ubuntu it puts it here: /usr/bin/filebot

There is an issue with the limited shell not allowing you to execute it as other users however so you need to edit /etc/lshell.conf and add it to the allowed applications…see the allowed applications below. I just tried it. With filebot in its default location, I got an error executing it as one of my secondary users, editing the lshell.conf allowed it to work.

test by executing this: filebot -version

[global]
logpath         : /var/log/lshell/
loglevel        : 2

[default]
allowed         : ['filebot','grep','cd','cp','-d','-dmS','git','irssi','ll','ls','-m','mkdir','mv','nano','pwd','-R','rm','rtorrent','rsync','-S','scp','screen','tar',$
forbidden       : [';', '&', '|','`','>','<', '$(', '${','sudo','vi','vim','./']
warning_counter : 2
aliases         : {'ls':'ls --color=auto','ll':'ls -l'}
intro           : "== Seedbox Shell ==\nWelcome To Your QuickBox Seedbox Shell\nType '?' to get the list of allowed commands"
home_path       : '/home/%u'
env_path        : ':/usr/local/bin:/usr/sbin'
allowed_cmd_path: ['/home/']
scp             : 1
sftp            : 0
overssh         : ['ls','rsync','scp']

Yes that’s correct,
I’ve edited /etc/password to /bin/bash before i read you’re answer, it seem’s to work
question is, is it safe ?

I’ve installed filebot the right way i’ll try and come back to tell you

Hello again, i try your way
but … it still doesn’t work
when i run this command from my user it works:

filebot -script fn:amc --output /home/samnawak/media --action symlink --conflict override -non-strict --log-file /home/samnawak/.session/amc.log --def unsorted=y music=y artwork=y ut_kind="multi" --def plex=localhost:QLxXp3aoYxV4ivyQhvuR --def "seriesFormat=tvshows/{n}/{'S'+s}/{fn}" "movieFormat=movies/{ny}/{fn}" "musicFormat=music/{albumartist}/{album}/{t}" /home/samnawak/torrents/rtorrent/

[details=But with this .rtorrent.rc ] # – START HERE –
directory.default.set = /home/samnawak/torrents/rtorrent
encoding.add = UTF-8
encryption = allow_incoming,try_outgoing,enable_retry
execute.nothrow = chmod,777,/home/samnawak/.config/rpc.socket
execute.nothrow = chmod,777,/home/samnawak/.sessions
network.port_random.set = yes
network.port_range.set = 57081-58581
network.scgi.open_port = localhost:57081
network.tos.set = throughput
pieces.hash.on_completion.set = no
protocol.pex.set = no
schedule = watch_directory,5,5,load.start=/home/samnawak/rwatch/*.torrent
session.path.set = /home/samnawak/.sessions/
throttle.global_down.max_rate.set = 0
throttle.global_up.max_rate.set = 0
throttle.max_peers.normal.set = 100
throttle.max_peers.seed.set = -1
throttle.max_uploads.global.set = 100
throttle.min_peers.normal.set = 1
throttle.min_peers.seed.set = -1
trackers.use_udp.set = yes
system.method.set_key=event.download.finished,filebot,“execute={/home/samnawak/scripts/rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}”
# – END HERE --[/details]

And this rtorrent-postprocess.sh
#!/bin/sh

# rtorrent.rc
# system.method.set_key=event.download.finished,filebot,"execute={rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/home/samnawak/media"

filebot -script fn:amc --lang=fr --output "$CONFIG_OUTPUT" --action symlink --conflict override -non-strict --log-file /home/samnawak/.session/amc.log --def plex=localhost:QLxXp3aoYxV4ivyQhvuR --def unsorted=y music=y artwork=y ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" --def "seriesFormat=tvshows/{n}/{'Season '+s}/{fn}" "movieFormat=movies/{ny}/{fn}" "musicFormat=music/{albumartist}/{album}/{t}" &

Nothing happens,
i think i found my problem of CPU Overload from another post , it happens after the download
As if rtorrent wasn’t lauching script after the end of the download, and making a loop,
No trace of running filebot in the amc.log

Any idea ?

3 suggestions:

  1. Does the /home/samnawak/media directory exist? The process will fail if it doesnt.
  2. Is the /home/samnawak/scripts/rtorrent-postprocess.sh executable? (chmod +x)
  3. Move the system.method.set_key=event.download.finished,filebot,"execute={/home/samnawak/scripts/rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}" higher in the .rtorrent.rc, right above the session.set.path. I know its weird but I’ve found if its near the bottom it doesnt work.

I moved .rtorrent.rc line, it works for me ^^'
but for other users it still not functionnal >.> i’m going to put a bullet in my head

Fix like this, are they include in tunning service ?

So I decided to test this using one of my non-privileged users that is using the limited shell. Here is the outcome:

  • It works. Filebot kicks in, transfers my files to my designated directory, downloads the extras and renames it to my desired format. I’m using hardlink and not symlink.
  • Odd thing: I can’t access it as my user. I can get into my pre-defined directory but as soon as I try to get into Movies it fails with “*** forbidden syntax: cd Movies”, I need to research that but I expect its an issue with the limited shell. If I become root, I can browse through the dir structure and everything looks as I would expect.
  • I do have a ~/.filebot/log/amc.log file being generated for my limited user.

I think you have setup issues if its not generating the log.

Edit: Could your issue be the plex refresh call? I would begin stripping down your filebot command to just the bare minimum.

Edit2: I figured out my issue with Movies. It’s this line in the lshell.conf:
forbidden : [’;’, ‘&’, ‘|’,’`’,’>’,’<’, ‘$(’, ‘${’,‘sudo’,‘vi’,‘vim’,’./’]

It was filtering on Movies. It didnt like the ‘vi’ in there.