Page 1 of 1

AMC script on rtorrent completion stopped working

Posted: 06 Jul 2015, 04:52
by smrapp
Hey there,

After a fair bit of tweaking, I was able to get filebot running on my server. My setup is run through rutorrent and I have filebot set to run upon completion. Everything was working well for a couple days after my initial troubles, but today I decided to change --conflict from override to auto because I would like to keep the highest quality and I think this is where things stopped working. I tried changing --conflict back to override and everything still seems to be broken.

I am still able to use the CLI with the exact same settings as my filebot script with no issues, so I know filebot is configured properly. Java is up to date and I am using the 64bit version. I have rebooted my server slot and subsequently my seedbox configuration more than once. I'm definitely stumped as to why everything would just all of a sudden stop. I am using absolute paths everywhere I can -- I believe this is what got the script working for me in the first place

Here is my sysinfo:

Code: Select all

FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: OK
chromaprint-tools: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Runtime Environment 1.8.0_45 (headless)
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 1 GB Max Memory / 23 MB Used Memory
OS: Linux (amd64)
uname: Linux liara-63839 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
rtorrent.rc configuration call

Code: Select all

# Filebot
system.method.set_key=event.download.finished,filebot_amc,"execute={/home/seed/filebot,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
filebot script:

Code: Select all

#!/bin/bash

export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"

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


filebot -script fn:amc --output "/home/seed/media" --log all --log-file amc.log --action symlink --conflict auto -non-strict --encoding utf8 --def music=y skipExtract=n ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=en artwork=false plex=<serverip>:<tokenid> &
There is no log to post because no log is created upon a torrent completion. However, this is a sample output from a CLI driven copy/paste of the filebot script in the previous entry:

Code: Select all

Run script [fn:amc] at [Mon Jul 06 06:36:09 CEST 2015]
Parameter: music = y
Parameter: skipExtract = n
Parameter: ut_kind = multi
Parameter: ut_dir = 
Parameter: ut_title = 
Parameter: subtitles = en
Parameter: artwork = false
Parameter: plex = <serverip>:<tokenid>
Argument: /home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE
Read archive [halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse.rar] and extract to [/home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE]
Extracting files [/home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE.mkv]
Input: /home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE.mkv
Exclude: /home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse.r03
etc..
etc..
Group: [tvs:halt and catch fire] => [Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Halt and Catch Fire, Halt and Fire]
Fetching episode data for [Halt and Catch Fire]
[SYMLINK] Rename [/home/seed/downloads/manual/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/halt.and.catch.fire.s02e06.720p.hdtv.x264-immerse/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE/Halt.and.Catch.Fire.S02E06.720p.HDTV.x264-IMMERSE.mkv] to [/home/seed/media/TV Shows/Halt and Catch Fire/Season 02/Halt and Catch Fire - S02E06 - 10Broad36.mkv]
Processed 1 files
Notify Plex: <server ip>
GET: <server ip>
Any help would be appreciated here. I'm not getting any errors at all, so I'm totally baffled. Almost just hoping that it will start working again as suddenly as it stopped

Re: AMC script on rtorrent completion stopped working

Posted: 06 Jul 2015, 05:39
by rednoah
No log? FileBot is not called. We now apply are general Linux "debugging" skills.

Add some logging to your "filebot" script (btw really bad name to for a shell script that calls "filebot", just asking for trouble here) to see what's happening.

* redirect some output (e.g. date) to file so you know the script is called
* redirect filebot output to file (INCLUDING ERROR OUTPUT 2>) so you know why filebot isn't executed

Re: AMC script on rtorrent completion stopped working

Posted: 06 Jul 2015, 07:15
by smrapp
Brilliant! Thanks for the help rednoah.

After I went through all the trouble of debugging my script, I decided to try running it from shell because after running a test torrent my log file didn't appear.

Turns out somewhere along the line my EOL changed from linux to windows. I have no idea how this happened without my knowledge as I am doing the configuration from home on linux! Either way, everything is as it should be again.

Also renamed my scripts and such to something a bit more descriptive :oops:

Cheers!

Re: AMC script on rtorrent completion stopped working

Posted: 06 Jul 2015, 07:18
by rednoah
I recommend using a proper code editor. Like Sublime or Atom. And make sure that files are transferred in binary mode when uploading files.

Re: AMC script on rtorrent completion stopped working

Posted: 06 Jul 2015, 07:25
by smrapp
I was using gedit (which I thought was a proper code editor), but I will look into your recommendations and double check the settings on my ftp client.

Thanks again