Installing filebot to a Zyxel NSA325 nas.

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Hi.
I have the above nas which I have installed fun_plug to and have couchpotato, sickbeard and sabnzbd running from via this script:
http://forum.nas-central.org/viewtopic. ... 49&t=10881.

I would like to incorporate filebot and the amc script onto my nas to do the renaming and moving automatically.
Is there any way to install it to my nas? and have it run at 1 hour intervals?
I have looked at missile huggers synology install listed in these forums, can I use this process?
Regards
Alan
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

1.
Install Java. If Java runs, FileBot runs.

2.
Install FileBot (copy+extract the portable, ipkg, etc)

3.
use cron for running programs at intervals
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

As usual you make it sound so easy.
Unfortunately I do not have the knowledge that you have. I have moved extracted the package to my nas.
How do I install java. I already have fun_plug installed.
And what about cron how do I set that up.
Thanks
Alan.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

0.
You understand that filebot is a console tool? There is no web interface. If you're not somewhat comfy with ssh-ing into your box and run a few commands you won't be able to use filebot anyway.

1.
I'm sure there's plenty of instructions how to install Java for your device. Whatever tutorial you find will probably end up with telling you to run "java -version" and see if it works.

2.
Then filebot will work out of the box, by running the filebot.sh script. How do we run scripts? "./path/to/filebot.sh -version"

3.
Also for cron you'll just have to google it. I'm sure there is lots of excellent guides.
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Thanks rednoah.
Yes, I do ssh into my nas as I have couchpotato, sickbeard and sabnzbd running from it nicely. I also use your wonderful amc script to sort all my downloads at the moment as well. I just want to incorporate it all on my nas.
I have googled and tried to install java but so far not so lucky. I am a bit worried that if I keep messing about with the wrong commands then my nas may need resetting, don't really want to go down that road again.
I will persevere.
Many thanks
Alan.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Ok, so got java working using this helpful thread. http://nas-tweaks.net/419/installation- ... -fun_plug/
I assume you cannot use a .bat file in linux, so how do I incorporate my commands below onto my nas? Do I add this information to the filebot.sh file?
I really do appreciate your help.

Code: Select all

REM Organise Files
call filebot -script fn:amc "d:\completed downloads" --output "\\NSA325" --action move -non-strict --def minFileSize=10485760   --conflict override --def clean=y  --def "seriesFormat=tvshows/{n}/{n} - {sxe} - {t}"  --def "movieFormat=movies/{n} ({y})" 


REM delete left behind empty folders
call filebot -script fn:cleaner "d:\completed downloads" --def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|par2|part1|part2|part3|part4|part5|part6"
Thanks
Alan.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

No, on linux "bat" files are called shell scripts.

DONT touch filebot.sh (this is basically filebot.exe)

Just make a new shell script "myscript.sh" somewhere and chmod +x (to make it executable) it. The rest is similar to windows

Code: Select all

./path/to/script.sh arg1 arg2 ...
Simple scripts like that would be very similar to bat script. Google basic Linux skills.


Also you MUST set this option:
--def excludeList=amc-input.txt Keep a list of previously processed files to be ignored in future runs (if you run this script on the same files repeatedly you must enable this option)
So you don't DDoS the nice web services of TheTVDB/TheMovieDB with unnecessary call.
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

ok made a script.sh file, in the filebot main directory, with these contents.

Code: Select all

#!/bin/bash

sh filebot.sh -script fn:amc "\\NSA325\admin\download\complete" --output "\\NSA325" --action move -non-strict  --def excludeList=amc-input.txt  --def minFileSize=10485760   --conflict override  --def clean=y  --def "seriesFormat=tvshows/{n}/{n} - {sxe} - {t}"  --def "movieFormat=movies/{n} ({y})" 

sh filebot.sh -script fn:cleaner "\\NSA325\admin\download\complete" --def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|par2|part1|part2|part3|part4|part5|part6"
When I run it using sh script.sh I get this output:

Code: Select all

:
root@NSA325:/ffp/bin/filebot# sh script.sh
: command not found
: command not found
Parameter: excludeList = amc-input.txt
Parameter: minFileSize = 10485760
Parameter: clean = y
Parameter: seriesFormat = tvshows/{n}/{n} - {sxe} - {t}
Parameter: movieFormat = movies/{n} ({y})
Argument: /usr/local/zy-pkgs/ffproot/ffp/bin/filebot/\NSA325\admin\download\complete
Argument: /usr/local/zy-pkgs/ffproot/ffp/bin/filebot/
Exception: File not found: /usr/local/zy-pkgs/ffproot/ffp/bin/filebot/\NSA325\admin\download\complete
Failure (°_°)

Please help, I think I am quite close to it now, I have java installed and cron is running but I just can't get this last part to work. I have spent so long researching all this it is becoming a blur.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

You're not escaping arguments. Read the fat/red/orange/colorful parts of the amc manual.

EDIT:
Scratch that. You just happen to use a simple format where you don't need that.

You just can't use \\server syntax. Can't use Windows UNC paths on Unix. So use normal paths instead. And don't use \ on Unix.
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Thank you Rednoah. I did know about \ but forgot.
I just copied my windows script right into my nas and expected it to work.
Please be patient with me I have a very bad short term memory (Anterograde amnesia) which was caused by a near fatal motorcycle accident a few years ago. I don't even know my left from my right without thinking about it.
Anyway, I will play about with it until I get stuck again.
Regards
Alan.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

Sorry about that, glad you're OK. :oops:

Upgraded your rank so I'll probably be nicer next time. ;)
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Thank you Rednoah.
It was a long time ago, and the only real problem I have now is with my bad memory and occasional migraines. It really is very frustrating.

Back on track, I am still getting bad commands.
Here is my script, I have disabled the cleaner script for now

Code: Select all

sh filebot.sh -script fn:amc "/i-data/e3374477/admin/download/complete"  --output  "/i-data/e3374477/admin/download/Done"  --action move -non-strict  --def excludeList=amc-input.txt  --def minFileSize=10485760   --conflict override --def clean=y  --def "seriesFormat=tvshows/{n}/{n} - {sxe} - {t}"  --def "movieFormat=movies/{n} ({y})" 

# sh filebot.sh -script fn:cleaner "/i-data/e3374477/admin/download/complete" --def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|par2|part1|part2|part3|part4|part5|part6"
And the output:

Code: Select all

root@NSA325:/ffp/bin/filebot# sh script.sh
: command not found
Parameter: excludeList = amc-input.txt
Parameter: minFileSize = 10485760
Parameter: clean = y
Parameter: seriesFormat = tvshows/{n}/{n} - {sxe} - {t}
Parameter: movieFormat = movies/{n} ({y})
Argument: /i-data/e3374477/admin/download/complete
Argument: /usr/local/zy-pkgs/ffproot/ffp/bin/filebot/
Exception: File not found: /usr/local/zy-pkgs/ffproot/ffp/bin/filebot/
Failure (°_°)
: command not found
: command not found
: command not found
root@NSA325:/ffp/bin/filebot#
I am sorry I need your help so much but I am trying everything I can think of to get this working.
Regards
Alan
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

I got it working. Only took 7 hours to realise something about EOL conversion, and it was only through a process of elimination that I came to that conclusion. yay! :cry:
The only error I have now is this.

Code: Select all

Dec 12, 2013 2:19:36 AM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
I looked it up and was completely lost. Is it important?

AMC could not match my version of the hangover part 3 to The Hangover Part lll and just decided it was the original hangover (2009). Could that have anything to do with the error? Or do you think that is probably normal?

Anyway, now I have to look up about cron all over again cos I forgot. :roll:

All the best
Alan
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

The warning just means it can't load libmediainfo. That's normal on ARM. Features that require MediaInfo just won't work that's all.

Things getting slightly mismatched is pretty normal for messy names with multiple almost-equal options. Send me the file paths and I'll have a look.
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Hi Rednoah.

I am trying to set up your wonderful script on a cronjob but I am having little to no success.
Here is what I have done.
I got information from here: http://nas-tweaks.net/431/uwcron-cron-for-the-fun_plug/
I created a filebotcron.sh script in ffp/etc/cron.d
the contents of the filebotcron script is:

Code: Select all

*/4  * * * * /usr/local/zy-pkgs/ffproot/ffp/bin/filebot/script.sh
I set it to run every 4 mins just for testing.
Nothing happens.
A log file produces.
-sh: */4 *: No such file or directory.
If you can help I would be much appreciated.
Regards
Alan.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing filebot to a Zyxel NSA325 nas.

Post by rednoah »

You seem to have written down a crontab entry (i.e. config file) and execute is as if it was a script.

This is from 14 years ago:
http://www.unixgeeks.org/security/newbi ... ron-1.html

It seems like you don't much looked into the second half of the blog post. It doesn't really say how to name configurations files, maybe just any file you put into /ffp/etc/cron.d/ and it says u need to restart it to reload the configurations. Also that you can check everything by calling crontab -l.

I'm not the author of uwcron so you better ask whoever made that program. I can only assume that it works exactly like standard Unix cron.
:idea: Please read the FAQ and How to Request Help.
datalore44
Supporter
Posts: 23
Joined: 27 Mar 2013, 19:18

Re: Installing filebot to a Zyxel NSA325 nas.

Post by datalore44 »

Well it seems that uwcron has a lot of problems with my nas, so I have to use zyxel utils which has cron built in.
So back to the drawing board.
Post Reply