Run Filebot from NZBGet but not on the same device

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

Run Filebot from NZBGet but not on the same device

Post by cm2003 »

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: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

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: 19
Joined: 30 Oct 2018, 14:57

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

Post by cm2003 »

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: 19
Joined: 30 Oct 2018, 14:57

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

Post by cm2003 »

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: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

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.
mouzzampk2014
Posts: 35
Joined: 07 Jan 2019, 00:49

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

Post by mouzzampk2014 »

cm2003 wrote: 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
Hi, did you install sshpass inside the nzbget container? I am trying to do the samething, I have nzbget running in container on ubuntu 18.04 and filebot installed natively. Currently I can see ssh is possible to run but sshpass is not installed. I don't think I can use password in ssh as you have in your example? Thank you
Post Reply