Unraid Server Filebot setup

Support for unRAID and docker container users
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Unraid Server Filebot setup

Post by uaeproz »

Hello,

I'm very new to programming with very little knowledge so bear with me cause I might sound dump to you that is cause I lack the knowledge in this world.

I've been trying many times to setup and install filebot. I initially started with docker, it was working to the some of the commands and some. However, suddenly most of the functions stopped.

Then I removed the docker and tried installing normal plugins through PuTTY SSH but my attempts were unsuccessful.

I made a little research to see what went wrong. I think with version 4.7.6, things were working with the docker but when filebot was upgraded to 4.7.7 things went wrong. Check this thread where multiple issue reported specially on native Library. This became common issue and here is the common error few users are getting:

{duration} => Expression yields empty value: Binding "duration": Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path ([file:/usr/share/filebot/FileBot.jar])
{duration} => Expression yields empty value: Binding "duration": Could not initialize class net.filebot.mediainfo.MediaInfoLibrary

For more info, please refer to this thread on https://lime-technology.com/forum/index ... =40400.120

Please look into this issue and perhaps you can provide a solution. I guess all Unraid OS users are facing the same issue when they update to 4.7.7

With the above being said, I'd like to setup filebot again from the scratch with your support by following your guidance in step by step commands and kindly provide me with instructions before I paste the commands into the PuTTY SSH cause I don't know all of the basic commands.

I hope I have clearly stated the issue and I would appreciate your support.

Thank you so much in advance for the efforts you are providing.
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

In the previous thread, we have succesfully installed filebot:
viewtopic.php?f=4&t=4650&p=26216#p26212

FileBot can do many things. What would you like FileBot to do?
:idea: Please read the FAQ and How to Request Help.
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

rednoah wrote:In the previous thread, we have succesfully installed filebot:
viewtopic.php?f=4&t=4650&p=26216#p26212

FileBot can do many things. What would you like FileBot to do?

You told me in the Private Messages to make a new thread and explain what I want. I didn't understand why and I'm confused by your reply above.

Anyways, filebot is not responding to commands like this command when i paste it to PuTTY SSH: filebot movies/{ny} - {resolution} - {channels}/{ny} - {resolution} - {channels} - {' CD'+pi} - {'.'+lang}

I pasted the server response in the other thread.

So what should I do?
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

What I want from filebot to do is the following:
Renames the all the movies directory with the this format - Example: "Movie Name - Year - Resolution(720p) - Channels - Size - /Movie Name - Year - Resolution (720p) - Channels - Size"

Subtitle: Movie Name - Year - Resolution (720p) - Channels - Size - Subtitle Language"

tv shows directory with this format - Example: "Name/Special or Season #/Name S00E00 - Resolution (720p) - Channels - Size"

Subtitle: Name/Special or Season #/Name S00E00 - Resolution (720p) - Channels - Size - Subtitle Language

Also I want to delete the rest of the empty folders (without duplicating the files).
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

1.
I'm not sure you understand what filebot does and what filebot does not do.

This "command" has absolutely no meaning, so I can't guess what you're trying to do:

Code: Select all

filebot movies/{ny} - {resolution} - {channels}/{ny} - {resolution} - {channels} - {' CD'+pi} - {'.'+lang}
Presumably you want to do something like this:

Code: Select all

filebot -rename -r /path/to/input --action move --db TheMovieDB --output /path/to/output --format "movies/{ny} - {resolution} - {channels}/{ny} - {resolution} - {channels} - {' CD'+pi} - {'.'+lang}"
You may possibly be referring to the amc script for processing files.


2.
I am not the author of this docker:
https://lime-technology.com/forum/index ... ic=40400.0

I'm not sure what it does. While it does use filebot, it also seems to be doing a few other things like watching files that is completely independent of filebot itself. FileBot itself is easy, but if you need a more advanced setup where FileBot is just one component in a bigger machine, then it will be difficult to set it up yourself.

If the developers of that docker container have any questions, feel free to direct them to the forums here.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

uaeproz wrote:What I want from filebot to do is the following:
Renames the all the movies directory with the this format - Example: "Movie Name - Year - Resolution(720p) - Channels - Size - /Movie Name - Year - Resolution (720p) - Channels - Size"

Subtitle: Movie Name - Year - Resolution (720p) - Channels - Size - Subtitle Language"

tv shows directory with this format - Example: "Name/Special or Season #/Name S00E00 - Resolution (720p) - Channels - Size"

Subtitle: Name/Special or Season #/Name S00E00 - Resolution (720p) - Channels - Size - Subtitle Language

Also I want to delete the rest of the empty folders (without duplicating the files).
This sounds like a job for the amc script.

Basic usage will look something like this:

Code: Select all

filebot -script fn:amc --output "/path/to/output" --action copy -non-strict "/path/to/input" --log-file amc.log --def excludeList=amc.txt
Note: You cannot paste this command verbatim. It's just an example.

You can specify your custom movie format by adding this option to the command:

Code: Select all

--def movieFormat="movies/{ny} - {resolution} - {channels}/{ny} - {resolution} - {channels} - {' CD'+pi} - {'.'+lang}"
You can enable subtitles by adding the subtitles option:

Code: Select all

--def subtitles=en
If you set --action move and want to get rid of left-behind foldes you can set the clean option:

Code: Select all

--def clean=y
:idea: The amc script is a command-line tool. If you want to call this command-line tool in intervals or whenever files are added, then that's a completely different task and there may be special solutions for UnRaid (e.g. on Synology NAS you'd use the Synology Scheduler).
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

You need to understand what the amc script does and does not. Hopefully this simple example will make it clear. You don't need to send me the output. Just look at the commands and try to understand what we're doing here. It's the most simple usage of FileBot and anything else just builds upon those basics.

Create example files:

Code: Select all

mkdir test

Code: Select all

cd test/

Code: Select all

mkdir input

Code: Select all

cd input/

Code: Select all

touch Alias.1x01.avi

Code: Select all

touch Avatar.2009.avi

Code: Select all

cd ..

Code: Select all

mkdir output
Run amc script:

Code: Select all

filebot -script fn:amc input/ --output output/ -non-strict
Output:

Code: Select all

filebot -script fn:amc input/ --output output/ -non-strict --def minFileSize=0
Run script [fn:amc] at [Thu Feb 02 17:08:31 CST 2017]
Parameter: minFileSize = 0
Argument[0]: test/input
{duration} => Expression yields empty value: Binding "duration": Invalid media file: test/input/Alias.1x01.avi
{duration} => Expression yields empty value: Binding "duration": Invalid media file: test/input/Avatar.2009.avi
Input: test/input/Alias.1x01.avi
Input: test/input/Avatar.2009.avi
Group: [tvs:alias] => [Alias.1x01.avi]
Group: [mov:avatar 2009] => [Avatar.2009.avi]
Rename episodes using [TheTVDB]
Auto-detected query: [Alias]
Fetching episode data for [Alias]
Fetching episode data for [Aria the Animation]
Fetching episode data for [Alias Caracalla]
Fetching episode data for [Alias the Jester]
Fetching episode data for [Alias El Mexicano]
[MOVE] Rename [test/input/Alias.1x01.avi] to [test/output/TV Shows/Alias/Season 01/Alias - S01E01 - Truth Be Told.avi]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [test/input/Avatar.2009.avi]
[MOVE] Rename [test/input/Avatar.2009.avi] to [test/output/Movies/Avatar (2009)/Avatar (2009).avi]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ

This is the simplest usage. You can add options for custom formats, subtitles, artwork, etc. If you want to run the amc script automatically on new files then you need to look into additional tools like cron, scheduler, inotify-tools, etc.


PS: The FileBot docker container you linked also includes inotify-tools to watch files and then call filebot on new files. FileBot itself does not watch files. You think might be confused about that.
:idea: Please read the FAQ and How to Request Help.
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

Code: Select all

root@Tower:/mnt/cache/appdata/filebot/filebot# filebot -script fn:amc --output "/mnt/cache/appdata/filebot/filebot/data/logs/amc.log/to/output" --action copy -non-strict "/mnt/cache/appdata/filebot/to/input" --log-file amc.log --def excludeList=amc.txt
Locking /mnt/cache/appdata/filebot/filebot/data/logs/amc.log
Illegal Argument: java.nio.file.NoSuchFileException: /mnt/cache/appdata/filebot/to/input (/mnt/cache/appdata/filebot/to/input)
Run script [fn:amc] at [Thu Feb 02 15:15:44 GST 2017]
Parameter: excludeList = amc.txt
Argument[0]: File does not exist: /mnt/cache/appdata/filebot/to/input
Illegal usage: output folder must exist and must be a directory: /mnt/cache/appdata/filebot/filebot/data/logs/amc.log/to/output
Failure (°_°)

what went wrong here?
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

Code: Select all

root@Tower:/mnt/disk1# filebot -script fn:amc --output "/Movies/to/Movies" --action copy -non-strict "/Movies/to/Movies" --log-file amc.log --def excludeList=amc.txt
Locking /mnt/cache/appdata/filebot/filebot/data/logs/amc.log
Illegal Argument: java.nio.file.NoSuchFileException: /Movies/to/Movies (/Movies/to/Movies)
Run script [fn:amc] at [Thu Feb 02 15:27:02 GST 2017]
Parameter: excludeList = amc.txt
Argument[0]: File does not exist: /Movies/to/Movies
Illegal usage: output folder must exist and must be a directory: /Movies/to/Movies
Failure (°_°)
root@Tower:/mnt/disk1# mc

root@Tower:/mnt/disk1/Movies# filebot -script fn:amc --output "/Movies/to/Movies" --action copy -non-strict "/Movies/to/Movies" --log-file amc.log --def excludeList=amc.txt
Locking /mnt/cache/appdata/filebot/filebot/data/logs/amc.log
Illegal Argument: java.nio.file.NoSuchFileException: /Movies/to/Movies (/Movies/to/Movies)
Run script [fn:amc] at [Thu Feb 02 15:28:07 GST 2017]
Parameter: excludeList = amc.txt
Argument[0]: File does not exist: /Movies/to/Movies
Illegal usage: output folder must exist and must be a directory: /Movies/to/Movies
Failure (°_°)
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

filebot -script fn:amc --output Finished --action Move -non-strict Movies --log-file amc.log --def excludeList=amc.txt

This command seems to be working :)

I think I'm getting it now. Just give me few hours, I will give you my output
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

Yep. It's best to start with something simple and then just keep adding features until it works exactly the way you want. Let me know if you have any questions.

For testing you can use --action test and --action duplicate so you don't have to recreate your test files each time.
:idea: Please read the FAQ and How to Request Help.
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

It worked!! (with minor issue). Here is the output:

Code: Select all

root@Tower:/mnt/disk1# filebot -rename -r Movies --action move --db TheMovieDB --output Finished --format "movies/{ny} - {resolution} - {channels}/{ny} - {resolution} - {channels} - {' CD'+pi} - {'.'+lang}" --def subtitles=ar --def clean=y
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/mnt/disk1/Movies/X+Y (2015)/X+Y (2015).mkv]
Stripping invalid characters from new path: movies/Atlantis: End of a World, Birth of a Legend (2011) - - /Atlantis: End of a World, Birth of a Legend (2011) - - - -
Stripping invalid characters from new path: movies/Atlantis: End of a World, Birth of a Legend (2011) - - /Atlantis: End of a World, Birth of a Legend (2011) - - - - .ara
Stripping invalid characters from new path: movies/Neighbors 2: Sorority Rising (2016) - - /Neighbors 2: Sorority Rising (2016) - - - -
Stripping invalid characters from new path: movies/Neighbors 2: Sorority Rising (2016) - - /Neighbors 2: Sorority Rising (2016) - - - - .ara
Stripping invalid characters from new path: movies/Winnie the Pooh: Springtime with Roo (2004) - - /Winnie the Pooh: Springtime with Roo (2004) - - - -
Stripping invalid characters from new path: movies/Star Wars (1977) - - /Star Wars (1977) - - - -
Stripping invalid characters from new path: movies/Star Wars (1977) - - /Star Wars (1977) - - - - .ara
Stripping invalid characters from new path: movies/Quantum of Solace (2008) - - /Quantum of Solace (2008) - - - -
Stripping invalid characters from new path: movies/Quantum of Solace (2008) - - /Quantum of Solace (2008) - - - - .ara
 [MOVE] Rename [/mnt/disk1/Movies/Atlantis - End of a World, Birth of a Legend (2011)/Atlantis - End of a World, Birth End of a World, Birth of a Legend (2011) - - - -.mkv]
[MOVE] Rename [/mnt/disk1/Movies/Atlantis - End of a World, Birth of a Legend (2011)/Atlantis - End of a World, Birth of a Legend (2011).ara.srt] to [/mnt/disk1/Finished/movies/Atlantis End of a World, Birth of a Legend (2011) - -/Atlantis End of a World, Birth of a Legend (2011) - - - - .ara.srt]
[MOVE] Rename [/mnt/disk1/Movies/Neighbors 2 - Sorority Rising (2016)/Neighbors 2 - Sorority Rising (2016).mkv] to [/mnt/disk1/Finished/movies/Neighbors 2 Sorority Rising (2016) - -/Neighbors 2 Sorority of a Legend (2011).mkv] to [/mnt/disk1/Finished/movies/Atlantis End of a World, Birth of a Legend (2011) - -/Atlantis Rising (2016) - - - -.mkv]
[MOVE] Rename [/mnt/disk1/Movies/Neighbors 2 - Sorority Rising (2016)/Neighbors 2 - Sorority Rising (2016).ara.srt] to [/mnt/disk1/Finished/movies/Neighbors 2 Sorority Rising (2016) - -/Neighbors 2 Sorority Rising (2016) - - - - .ara.srt]
Processed 391 files
root@Tower:/mnt/disk1#
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

Ok regarding the issue. I used this command:

Code: Select all

filebot -rename -r Movies --action move --db TheMovieDB --output Finished --format "movies/{ny} - {resolution} - {channels}/{ny} - {resolution} - {channels} - {' CD'+pi} - {'.'+lang}" --def subtitles=ar --def clean=y


The problem here as you can see that I have specified resolution and channels also I requested subtitles. Now subtitles may not have issue cause most of the files have subs but I'm not sure if filebot have accepted this command or not. But for sure the resolution and channels commands were not applied. Instead, I got - - - -

Can you advice?
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

Bindings like resolution and channels require MediaInfo. Since MediaInfo isn't working on your machine, these bindings won't work.
:idea: Please read the FAQ and How to Request Help.
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

These bindings were working before but after the update it stopped. Is there a way identify a solution to the update?
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

You could try replacing the current libmediainfo.so with an older version:
viewtopic.php?f=13&t=4540&p=25522#p25522
:idea: Please read the FAQ and How to Request Help.
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

It's working now!!!!

Seems like the issue is with the update. Can you log this issue for the upcoming version release?
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

How do I enter the subtitle for opensubtitles.com?
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

Just minor issue I'm not comfortable with.

Code: Select all

[MOVE] Rename [/mnt/disk1/movies/Spy Game (2001) - 1080p - 5.1/Spy Game (2001) - 1080p - 5.1 - -.mkv] to [/mnt/disk1/Finished/movies/Spy Game (2001) - 1080p - 5.1/Spy Game (2001) - 1080p - 5.1 - -.mkv]
The file has - - at the end.

Here is the command

Code: Select all

filebot -rename -r movies --action move --db TheMovieDB --output Finished --format "movies/{ny} - {vf} - {channels}/{ny} - {vf} - {channels} - {' CD'+pi} - {'.'+lang}" --def subtitles=ar,en,ru --def clean=y
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

One more issue. I don't see filebot is trying to get subtitles from opensubtitles. I can I do that?

Like this for example:

Code: Select all

filebot -rename -r movies --action move --db TheMovieDB --output Finished --format "movies/{ny} - {channels} - {vf}/{ny} - {channels} - {vf} - {' CD'+pi} - {'.'+lang}" --def subtitles=ar,en,ru --def clean=y -get-subtitles
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

Ok opensubtitles configured. Now the - - at the end of the file I couldn't remove it and the filebot is not trying to download subtitles
uaeproz
Donor
Posts: 51
Joined: 19 Jan 2017, 08:50

Re: Unraid Server Filebot setup

Post by uaeproz »

Code: Select all

root@Tower:/mnt/disk2# filebot -rename -r tv shows --action move --db TheTVDB --output Finished --format "{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t}.replaceAll(/[!?.]+$/).replacePart(', Part $1')} - {channels} - {vf} - {'.'+lang}" --def subtitles=ar,en,ru --def clean=y
Illegal Argument: java.nio.file.NoSuchFileException: /mnt/disk2/tv (tv)
Illegal Argument: java.nio.file.NoSuchFileException: /mnt/disk2/shows (shows)
SyntaxError: unexpected token: }
javax.script.ScriptException: SyntaxError: unexpected token: }
        at net.filebot.format.ExpressionFormat.compile(ExpressionFormat.java:109)
        at net.filebot.format.ExpressionFormat.<init>(ExpressionFormat.java:46)
        at net.filebot.cli.ArgumentBean.getExpressionFormat(ArgumentBean.java:214)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:83)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:120)

Failure (°_°)
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

Please read Cmdline and Argument Passing.

:idea: Use the @file syntax for reading command-line arguments from external text files. ;)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22851
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unraid Server Filebot setup

Post by rednoah »

--def subtitles is an option of the amc script and has no effect on simple -rename calls.
:idea: Please read the FAQ and How to Request Help.
Post Reply