Page 1 of 1

AMC script not working on seedbox

Posted: 13 Jan 2016, 04:42
by terminatorkiller66
I've been trying to get the AMC script to work on my feralhosting seedbox to automate my media, but it does not run, I have read many posts tried many different troubleshooting steps, even contacted feral support, but so far am unable to get the script to work.
Sysinfo output is:

Code: Select all

FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.70
p7zip: java.io.IOException: Cannot run program "7z": error=2, No such file or directory
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Runtime Environment 1.8.0_65 (headless)
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 48 Core / 26 GB Max Memory / 41 MB Used Memory
OS: Linux (amd64)
Package: PORTABLE
Data: /media/sdj1/sodasman88/filebot
uname: Linux porphyrion 3.16.7-ckt11-feral #2 SMP Tue Nov 10 12:20:16 GMT 2015 x86_64 GNU/Linux

--- UPDATE AVAILABLE: FileBot 4.6.1 (r3312) ---

Done ã¾(ï¼ âã¼âï¼ )ã
The script runs manually and the output from the log is

Code: Select all

Run script [fn:amc] at [Wed Jan 13 04:36:28 UTC 2016]
Parameter: excludeList = amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_dir = /private/rtorrent/data
Parameter: ut_kind = multi
Parameter: ut_title = 
Parameter: ut_label = 
Using excludes: /media/sdj1/sodasman88/Media/amc.excludes (0)
No files selected for processing
Failure (°_°)
My script I am using is

Code: Select all

#!/bin/sh

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

TORRENT_PATH="$1"
TORRENT_NAME="$2"
TORRENT_LABEL="$3"

filebot.sh -script fn:amc --output "$HOME/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

whoami > "$HOME/filebot/logs/log.txt"

filebot.sh -script fn:sysenv > "$HOME/filebot/logs/log.txt" 2>&1
I added to the .rtorrent.rc file the code to automatically run after downloading, but so far I have not seen any logs show up after a download, so I think the script is not running automatically.

Code: Select all

system.method.set_key=event.download.finished,filebot.sh,"execute={rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
Any help will be appreciate, Thanks

Re: AMC script not working on seedbox

Posted: 13 Jan 2016, 04:50
by rednoah
If this line doesn't do anything, then you have confirmed that filebot is never called:

Code: Select all

whoami > "$HOME/filebot/logs/log.txt"
HINT: No you haven't. For all you know $HOME isn't defined and that's why it's not working.

Back to basics. Make a simple script (simple scripts do not contain variables or filebot calls). Make sure that script is called by rtorrent (ask Google and rtorrent forums).

Re: AMC script not working on seedbox

Posted: 14 Jan 2016, 00:49
by terminatorkiller66
I have removed $HOME from all the scripts and the rtorrent.rc file and replaced with the full file path and it is still not called by rtorrent.

I can run the rtorrent-postprocess script manually from ssh, but the script fails as no parameters were supplied, and the error is written to the filebot/logs/amc.log, and the log.txt from the whoami.

However, rTorrent does not seem to run the AMC script as when a download is completed, nothing happens as nothing is written to the filebot/logs/amc.log file or the log.txt.

I am doing this on a seedbox from Feralhosting from that makes a difference.

I also tried getting a basic script to run automatically, but still is not called after a download and it does work from a manual run.

Re: AMC script not working on seedbox

Posted: 14 Jan 2016, 06:44
by rednoah
1.
You may need to restart rtorrent after changing the config file.

2.
This is clearly wrong. Where does rtorrent-postprocess.sh come from?

Code: Select all

system.method.set_key=event.download.finished,filebot.sh,"execute={rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
Did you follow the instructions?

Code: Select all

echo 'system.method.set_key=event.download.finished,filebot,"execute={'`pwd`/rtorrent-postprocess.sh',$d.get_base_path=,$d.get_name=,$d.get_custom1=}"' >> ~/.rtorrent.rc
If no, why not?

Re: AMC script not working on seedbox

Posted: 16 Jan 2016, 00:22
by terminatorkiller66
Thank you so much restarting rtorrent and using a new copy of rtorrent-postprocess.sh works.

One more question, how can I enable subtitles and notify plex to scan the library?

I tried adding --def plex=localhost:and my token
and for the subtitles added --def subtitles=en to the end of rtorrent-postprocess.sh and both are not working.
How am I suppose to add those options to the script?

Re: AMC script not working on seedbox

Posted: 16 Jan 2016, 04:01
by rednoah
What do the logs say?

Re: AMC script not working on seedbox

Posted: 16 Jan 2016, 07:54
by terminatorkiller66
Nevermind I got both working by moving it up next to the other options. Thanks for your help I appreciate it.

Re: AMC script not working on seedbox

Posted: 24 Jan 2016, 04:13
by skinnydave
Hey terminatorkiller66 - can you walk me through what you did exactly? I'm in the same boat...followed most (if not all instructions) to the T with feral, but nothing is quite working!

I have tried to run things via SSH and get the same output.

Simple commands work like this:

Code: Select all

~/filebot/filebot.sh -script fn:cleaner --action test /media/sdi1/USERNAME/private/plex/Movies
But if I try to run AMC I get the following:
~/filebot/filebot.sh -script fn:amc --output /media/sdi1/USERNAME/private/plex --log-file amc.log --action copy --conflict override -non-strict --def clean=y music=y subtitles=en artwork=y ut_dir=%D ut_file=%F ut_kind=multi” --action test
Locking /media/sdi1/skinnydave/filebot/logs/amc.log
Run script [fn:amc] at [Sun Jan 24 04:11:56 UTC 2016]
Parameter: clean = y
Parameter: music = y
Parameter: subtitles = en
Parameter: artwork = y
Parameter: ut_dir = %D
Parameter: ut_file = %F
Parameter: ut_kind = multi”
No files selected for processing
Failure (°_°)

Any help would be appreciated!

Re: AMC script not working on seedbox

Posted: 24 Jan 2016, 08:41
by rednoah
1.
You didn't replace the %variables with actual values. Please read the Troubleshooting section.

Also, if you have variables like %D in the command, then you most certainly didn't follow the rtorrent instructions:
viewtopic.php?f=4&t=215#p5316

2.
WTF is this? This Right Double Quotation Mark is wrong on so many levels... :lol:

Code: Select all

Parameter: ut_kind = multi”

Re: AMC script not working on seedbox

Posted: 24 Jan 2016, 14:34
by skinnydave
Can you tell how new I am at this? :roll: :)

I knew it was something dumb...sorry about that - I LOVE the idea behind this script though, thanks for working so hard on it and making this!