Execute Filebot AMC-Script on Synology triggered by nzbget

Any questions? Need some help?
Post Reply
ChrisAcon
Posts: 5
Joined: 03 Nov 2016, 14:00

Execute Filebot AMC-Script on Synology triggered by nzbget

Post by ChrisAcon »

Hi guys!

I am struggling with getting Filebot executed by nzgbet. Basically I want that a post processing script in nzbget calls the filebot process. If I call the same command via Shell manually it works great.

The Script looks as follows:

Code: Select all

### NZBGET POST-PROCESSING SCRIPT
#!/bin/bash

filebot -script fn:amc "/volume1/downloads/complete/" -non-strict --output "/volume1/downloads/#NewCompleteDownloads" --def reportError=y --log-file "/volume1/downloads/complete/filebotAMC.log" --def artwork=n music=y  clean=y --action move --conflict skip
exit 93;

The script starts and executes so far fine. However it terminates with
filebotAMC: Failure (°_°)
Can s.o. hint me to the solution?

Thanks
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by rednoah »

1.
Look at the nzbget-postprocess.sh example: https://github.com/filebot/plugins/blob ... process.sh


2.
Investigate and tell us your findings: viewtopic.php?f=4&t=3067



Failure (°_°) is definitely not the only output you'll get. I can tell you that right away. ;)
:idea: Please read the FAQ and How to Request Help.
ChrisAcon
Posts: 5
Joined: 03 Nov 2016, 14:00

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by ChrisAcon »

Hi!

Thank you very much for your quick reply. Writing log.txt works. Executing filebot command alike

Code: Select all

filebot -script fn:sysenv > "/volume1/downloads/#NewCompleteDownloads/Movies/logAll.txt" 2>&1
ends with:
test: /usr/local/nzbget/share/nzbget/scripts/test.sh: line 7: 1 : ambiguous redirect
Any further ideas what this can mean??

Thanks for your help in advance!
/Chris

Ps: I wasted already days by getting this running. So I appreciate all help I can get :ugeek:
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by rednoah »

This is clearly a generic bash issues that has nothing to do with FileBot specifically.

The log says Error in Line 7 yet your "script" consist of only one line. You only have these strange 1-line-only error messages (probably the last line of the output) which are either useless or misleading.

If you do things the stupid way (i.e. aimless trial and error via nzbget web interface) then you won't get far. ;)

Instead:

1. USE THE COMMAND-LINE
2. Manually run the amc script on a few files FROM THE COMMAND-LINE so you understand how it works and what the output should look like
3. Look at the nzbget integration script and fake a nzbget call (i.e. set environment variables as nzbget would do and then your script)
4. Clear & verify each precondition & assumption step by step so you know exactly what is working and what is not
:idea: Please read the FAQ and How to Request Help.
ChrisAcon
Posts: 5
Joined: 03 Nov 2016, 14:00

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by ChrisAcon »

Dear Rednoah,

thanks so far!

When I run the example script

Code: Select all

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL"
The error message is:
Illegal usage: output folder must exist and must be a directory: /volume1/@appstore/nzbget/var/Media
The error is the same even if I set the CONFIG_OUTPUT to another Dir. Any more hints? Or maybe we can do a brief teamviewer session? I am so far that I would even pay for it...

Thank you in advance!
/Chris
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by rednoah »

Does this folder exist?

Code: Select all

/volume1/@appstore/nzbget/var/Media
If that is the case then the next step would be to check permissions.


PS: private support is 50 EUR for the first two hours if you're so inclined ;)
:idea: Please read the FAQ and How to Request Help.
ChrisAcon
Posts: 5
Joined: 03 Nov 2016, 14:00

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by ChrisAcon »

Ok, works now! The check in nzbget is buggy. Just make sure that you upload a plan bash-file without filebot commands while configuring nzbget (nzgbet -> Settings -> Extension Scripts). Next, overwrite the uploaded script with your filebot script but do not change the settings in nzbget.

One last additional question. Does anyone know why the format expression:

Code: Select all

--def "movieFormat={n} ({y})/{n} ({y}){pi} [{vf}, {AC}, {AF}, {channels}].{ext}" 
delivers
MovieName (2015) [,,,,]
Thanks so far.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by rednoah »

Go to FAQ. Search for MediaInfo. You're missing the MediaInfo dependencies.

If you're on Synology you might wanna read the instructions to the end. ;)
:idea: Please read the FAQ and How to Request Help.
ChrisAcon
Posts: 5
Joined: 03 Nov 2016, 14:00

Re: Execute Filebot AMC-Script on Synology triggered by nzbget

Post by ChrisAcon »

Thanks! I installed the MediaInfo Package from the SynoCommunity. Finished! Thanks!
Post Reply