Run Filebot from NZBGet but not on the same device

Any questions? Need some help?
Post Reply
cm2003
Posts: 11
Joined: 30 Oct 2018, 14:57

Run Filebot from NZBGet but not on the same device

Post by cm2003 » 01 Nov 2018, 21:50

Hello.

I finally got Filebot Node running on my QNAP NAS and it's actually doing it's job really well.
I'm using NZBGet within docker (Container Station) on the same NAS. It's installed within an Ubuntu Image.

Now there is a post process script available, but I think it will only work as long as Filebot is installed on the same "machine"? Am I right?
Or is there any way to trigger Filebot from within NZBGet on an IP or something like this?

If not, is there a way to install FIlebot (+ Filebot Node) to Ubuntu? All I've seen seems to be using the GUI of Ubuntu, which I don't have.

Thanks
André

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

Re: Run Filebot from NZBGet but not on the same device

Post by rednoah » 02 Nov 2018, 04:20

You have 2 options.

The clean option is to have NZBGet call a command, and this command would then ssh into the QNAP NAS and call the filebot command on the NAS.

Alternatively, if you must use HTTP requests, and if you have FileBot Node running, then you can using the Request Inspector in your browser to see what HTTP requests are sent (i.e. parameters, headers, etc) when you click Execute in FileBot Node, and then you can just replay that request.
:idea: Please read the FAQ and How to Request Help.

cm2003
Posts: 11
Joined: 30 Oct 2018, 14:57

Re: Run Filebot from NZBGet but not on the same device

Post by cm2003 » 02 Nov 2018, 11:52

Thanks rednoah.
I've found a way to run it from the NZBGet shell using this command:

Code: Select all

sshpass -p PASSWORD ssh -l admin 192.168.178.3 "filebot -script 'fn:amc' /share/CACHEDEV1_DATA/Download/completed --output /share/CACHEDEV1_DATA/Multimedia --action move -non-strict --order Airdate --conflict auto --lang de --def 'unsorted=y' 'clean=y' 'skipExtract=y' 'seriesFormat=Series/{n}/{'\''Season '\''+s}/{n} - {s00e00} - {t}' 'movieFormat=Movies/{ny}/{ny}{'\'' CD'\''+pi}{subt}' 'excludeList=.excludes' --log all --log-file '/share/CACHEDEV1_DATA/.qpkg/filebot-node/data/filebot.log'"
Now I've been trying for 2 hours to implement this to a PP-Script, but I just can't make it work. Do you have any idea?

Thank you already!

cm2003
Posts: 11
Joined: 30 Oct 2018, 14:57

Re: Run Filebot from NZBGet but not on the same device

Post by cm2003 » 02 Nov 2018, 19:27

IT'S WORKING!

Code: Select all

#!/bin/sh

#######################################
### NZBGET POST-PROCESSING SCRIPT   ###

# Trigger Filebot
#
# This is a script to trigger Filebot. It starts sorting,
# renaming and cleaning up the downloaded file.

### NZBGET POST-PROCESSING SCRIPT   ###
#######################################

sshpass -p PASSWORD ssh -l admin 192.168.178.3 "filebot -script 'fn:amc' /share/CACHEDEV1_DATA/Download/completed --output /share/CACHEDEV1_DATA/Multimedia --action move -non-strict --order Airdate --conflict auto --lang de --def 'unsorted=y' 'clean=y' 'skipExtract=y' 'seriesFormat=Series/{n}/{'\''Season '\''+s}/{n} - {s00e00} - {t}' 'movieFormat=Movies/{ny}/{ny}{'\'' CD'\''+pi}{subt}' 'excludeList=.excludes' --log all --log-file '/share/CACHEDEV1_DATA/.qpkg/filebot-node/data/filebot.log'"

# NZBGet Exit Codes
if [ $? = 0 ]; then
	exit 93 # SUCCESS
	else
	exit 94 # FAILURE
fi
You need to make sure to use the unix line endings:
http://wiki.secondlife.com/wiki/How_to_ ... dows_tools

That was actually my only mistake. Just took me half a day :D

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

Re: Run Filebot from NZBGet but not on the same device

Post by rednoah » 05 Nov 2018, 15:58

cm2003 wrote:
02 Nov 2018, 19:27
You need to make sure to use the unix line endings:
http://wiki.secondlife.com/wiki/How_to_ ... dows_tools

That was actually my only mistake. Just took me half a day :D
It happens to the best of us, and usually not just once.......... Also, beware of the BOM if you're switching between the Unix and Windows worlds.
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests