Assistance with AMC Post Process Script

Support for macOS users
Post Reply
blahzaay
Posts: 3
Joined: 10 Apr 2018, 10:12

Assistance with AMC Post Process Script

Post by blahzaay »

Hi all,

I had an Automated Media Centre using OSX/Transmission/Filebot/Plex for the longest of times. I was using the Brew/Cask version (4.6.1). For various reasons I stopped using the whole setup sometime last year. I have come back to it and it is no longer working. I decided I'd do the right thing and buy the App Store version. I uninstalled the Homebrew/Cask version via CLI before doing so.

I lost the Command Line arguements with the App Store Version so I re-installed 4.6.1 via CLI (I now have both versions running). Either way, the post-process script that a run from Transmisson is not working. I was hoping someone could point me in the right direction?

My script is;

Code: Select all

#!/bin/bash
filebot -script fn:amc --output "/Volumes/Media/Videos" --action copy --conflict override -non-strict --def artwork=n music=n "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
I get the following error when I run that from the CLI manually:

FileNotFoundException: https://raw.githubusercontent.com/fileb ... amc.groovy
java.io.FileNotFoundException: https://raw.githubusercontent.com/fileb ... amc.groovy
at net.filebot.web.WebRequest.fetch(WebRequest.java:123)
at net.filebot.web.WebRequest.fetchIfModified(WebRequest.java:101)
at net.filebot.web.CachedResource.fetchData(CachedResource.java:28)
at net.filebot.web.CachedResource.fetchData(CachedResource.java:11)
at net.filebot.web.AbstractCachedResource.fetch(AbstractCachedResource.java:137)
at net.filebot.web.AbstractCachedResource.get(AbstractCachedResource.java:82)
at net.filebot.cli.ArgumentProcessor$DefaultScriptProvider.fetchScript(ArgumentProcessor.java:210)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
at net.filebot.Main.main(Main.java:169)
Failure (°_°)


Filebot Version:

FileBot 4.6.1 (r3315) / Java(TM) SE Runtime Environment 1.8.0_65


App Store Version: 4.7.19

It's been so long since I implemented this so many moons ago; I'm trying to re-learn it all. I've tried to read other posts in this Forums where uses have gotten the same error. I get the impression that my CLI versions needs to be updated? If so I'm not sure how to do this...

Any help would be so grateful.

-Brett
Last edited by blahzaay on 14 Apr 2018, 04:41, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Assistance with AMC Post Process Script

Post by rednoah »

The first step would be to install the latest command-line tools via brew cask:
viewtopic.php?f=4&t=2049

Make sure to install Java 8 though:
viewtopic.php?f=4&t=2049&p=33287#p33287
:idea: Please read the FAQ and How to Request Help.
blahzaay
Posts: 3
Joined: 10 Apr 2018, 10:12

Re: Assistance with AMC Post Process Script

Post by blahzaay »

Thanks for your help... With your instructions I was able to successfully install the lastest version. GUI and CLI versions now match. Java 8 has also been installed. However it seems that Transmission is not calling the script correctly or something is failing during the process.

## FILEBOT ##

Code: Select all

filebot -version
FileBot 4.7.9 (r4984) / Java(TM) SE Runtime Environment 1.8.0_162 / Mac OS X 10.13.4 (x86_64)[/i][/b]

## FILEBOT SCRIPT SYSINFO ##

Code: Select all

filebot -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-03-16 (r516)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_162
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 18 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin mac-mini.verney.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
[/i][/b]

## JAVA ##

Code: Select all

java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)[/b][/i]

I did edit "ut_dir=$D" and "ut_title=$N" and the script still runs fine when I replace the variables with actual values, so Filebot is working OK.

What is the best way to check if Transmission is executing the script correctly? Is there a default log file that will be appended? Or do I need to specify this in the script in some way?

Thanks again!

-Brett
Last edited by blahzaay on 14 Apr 2018, 04:42, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Assistance with AMC Post Process Script

Post by rednoah »

Here's some general tips on debugging 3rd party programs that are supposed to call your shell scripts:
viewtopic.php?f=4&t=3067
:idea: Please read the FAQ and How to Request Help.
blahzaay
Posts: 3
Joined: 10 Apr 2018, 10:12

Re: Assistance with AMC Post Process Script

Post by blahzaay »

OK so I fixed the issue with your help.

I confirmed that Transmission was calling the script by removing everything and specifying only the below, in the script:

Code: Select all

whoami > /tmp/amc-log.txt
However when I logged stderr and stdout by adding the code below to the end of the script:

Code: Select all

> /tmp/amc-log.txt 2>&1
I got an error saying that the 'filebot' command does not exist, despite being able to run it manually from Terminal.

I fixed this by specifying the full path to the filebot executable:

Code: Select all

/usr/local/bin/filebot
It took me forever to get this to work, mostly because you made me go out and learn Linux, but I am grateful you did because now I could troubleshoot this much easier in the future. In fact my script now looks nothing like the one I posted above but does so much more!

Thanks again.
Post Reply