Kids Movies

Running FileBot from the console, Groovy scripting, shell scripts, etc
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Really need help with scripting:

Post by rednoah »

Here's a format snippet that will yield different values depending on whether or not the file path contains the word Kids:

Code: Select all

{f =~ /Kids/ ? 'Kids Movies' : 'Normal Movies'}
:idea: Please read the FAQ and How to Request Help.
Jerome2626
Posts: 27
Joined: 07 Mar 2020, 12:56

Re: Kids Movies

Post by Jerome2626 »

I have the following libraries:

Code: Select all

/mnt/user/Film (Movies)
/mnt/user/KidsFilm (Kids Movies)
/mnt/user/Serier (Series)
/mnt/user/KidsSerier (Kids Series)

Code: Select all

/mnt/user/downloads/complete/film (Movies)
/mnt/user/downloads/complete/serier (Series)
When I try your proposalt it gives the following errors:

Code: Select all

/opt/filebot/filebot -script fn:amc /mnt/disks/WDC_WD30EZRX-00D8PB0_WD-WCC4N7VXZ3TR/downloads/complete/film --output /mnt/user/Film/ --action test -non-strict --conflict override --lang da --def "ut_label=movie" --def movieFormat="/mnt/user/Film/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}" --def artwork=y --def subtitles=da,en --log-file amc.log --def root=y --def clean=y {f =~ /Kids/ ? 'Kids Movies' : 'Normal Movies'}

Code: Select all

Illegal Argument: java.nio.file.NoSuchFileException: /tmp/{f ({f)
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/=~ (=~)
Illegal Argument: java.nio.file.NoSuchFileException: /Kids (/Kids)
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/? (?)
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/Kids Movies (Kids Movies)
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/: (:)
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/Normal Movies} (Normal Movies})
Run script [fn:amc] at [Thu Mar 12 10:02:30 CET 2020]
Parameter: ut_label = movie
Parameter: movieFormat = /mnt/user/Film/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}
Parameter: artwork = y
Parameter: subtitles = da,en
Parameter: root = y
Parameter: clean = y
Argument[0]: /mnt/disks/WDC_WD30EZRX-00D8PB0_WD-WCC4N7VXZ3TR/downloads/complete/film
Argument[1]: File does not exist: {f
Argument[2]: File does not exist: =~
Argument[3]: File does not exist: /Kids
Argument[4]: File does not exist: ?
Argument[5]: File does not exist: Kids Movies
Argument[6]: File does not exist: :
Argument[7]: File does not exist: Normal Movies}
Jerome2626
Posts: 27
Joined: 07 Mar 2020, 12:56

Re: Kids Movies

Post by Jerome2626 »

Why won't this separate into the right folders?

Code: Select all

/opt/filebot/filebot -script fn:amc /mnt/disks/WDC_WD30EZRX-00D8PB0_WD-WCC4N7VXZ3TR/downloads/complete/film --output /mnt/user/Film/ --action test -non-strict --conflict override --lang da --def movieFormat="/mnt/user/{label}/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}" --def artwork=y --def subtitles=da,en --log-file amc.log --def root=y --def clean=y --def "ut_label=Børn" --def "ut_label=Film"
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Kids Movies

Post by rednoah »

Looks like you might wanna familiarize yourself with FileBot Format Expressions first:
https://www.filebot.net/naming.html

Please use the GUI and play a little bit in the Format Editor:
Image

:arrow: You will need to learn and understand the basic concepts first, before you can apply them on the command-line. Understand how things fit together. Don't copy & paste blindly. It'll make sense. ;)
:idea: Please read the FAQ and How to Request Help.
Jerome2626
Posts: 27
Joined: 07 Mar 2020, 12:56

Re: Kids Movies

Post by Jerome2626 »

First of all thanks for the help with the hints.
I got it working I think with this AMC script.

Code: Select all

/opt/filebot/filebot -script fn:amc /mnt/disks/WDC_WD30EZRX-00D8PB0_WD-WCC4N7VXZ3TR/downloads/complete/ --output /mnt/user/ --action test -non-strict --conflict override --lang da --def "movieFormat=/mnt/user/{f =~ /KidsFilm/ ? 'KidsFilm' : 'Film'}/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}" --def "seriesFormat=/mnt/user/Serier/{n}/Season {s}/{n} {sxe} {t}" --def artwork=y --def subtitles=da,en --log-file amc.log --def root=y --def clean=y

My question are now.

1. Is it possible to add themoviedb & tvdb api key?
2. Is it possible somehow to get actor thumb downloaded along with artwork? Normally I have a .actors subfolder.
3. Is it possible to get it to download trailer from perhaps youtube/HDtrailers/Apple Trailers etc?
4. Will it be possible to update Plex Library after the renaming, moving and artwork?

Thanks again for the help.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Kids Movies

Post by rednoah »

1.
No. Why though?

2. & 3.
Creation of actor thumbnail and trailer files is not supported. If you're using Plex, then Plex will take care of fetching all the extra stuff that Plex needs.

4.
Yes. Please read the amc script manual for details.
:idea: Please read the FAQ and How to Request Help.
Jerome2626
Posts: 27
Joined: 07 Mar 2020, 12:56

Re: Kids Movies

Post by Jerome2626 »

Thanks.

1. I was just thinking about local language, but that should be covered also with --lang da. But on series the .nfo are not created for the episodes. I will only create for the entire show...
2. In regards to the .actor no picture are coming on when scanning afterwards in Plex. I have Plex Pass but it works with EMM but is troublesome and would like to use Filebot instead for that, but it isn't working. I think if you can download poster, fanart then actor pictures would be possible?
3. That was only to make sure that trailers was always available, and when I don't have local trailer it doesn't always get them in Plex.
4. The reason was I wanted to scrape movie library when movies was moved there and the same for Series. So not a complete scan of all libraries which will unnecesary spin up all disks instead of only those needed.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Kids Movies

Post by rednoah »

1.
There's currently no support for episode-level nfo files. This would be completely unrelated configuring custom API keys.


2.
You'll have to ask the Plex folks about how to make Plex work correctly. Plex is able to find all the metadata, thumbnails, etc by itself once it can identify the files. If Plex isn't working as expected, then you will find help in the Plex forums.


3.
If Plex can't reliably find trailers, then it stands to reason that perhaps it's not as trivial as it seems. As as far as FileBot is concerned, trailers are not supported, but you can always write your own scripts.


4.
The performance of Plex refresh is up to Plex. You can always write our own solution and the integrate that via --def exec if you can figure out how to make Plex refresh files in a more efficient manner that works better for your setup.

I'm aware of some folks with large libraries having trouble with Plex refresh taking a long time, for unknown reasons, but I mean on an OS level, just finding all files modified within the last ~1 day or so, is very very fast so you can always build something around that:

Code: Select all

time find /Media -mtime -1
:idea: Please read the FAQ and How to Request Help.
djblazdk
Posts: 7
Joined: 03 Feb 2019, 20:57

Re: Kids Movies

Post by djblazdk »

i use this.

Code: Select all

filebot -script fn:amc --action copy --conflict auto -non-strict --log-file amc.log --lang da --def movieFormat="V:/drev/Movie/{az}/{n}.({y})/{n} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}" seriesFormat="V:/drev/{if ('Familie' in genres) {'Kids Series'} else if ('Children' in genres) {'Kids Series'} else 'Series'}/{az}/{n}.({y})/Season {s00}/{n} - {s00e00} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}" --def subtitles=en,da "ut_label=none" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

Code: Select all

V:/drev/Movie/{az}/{n}.({y})/{n} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}

Code: Select all

V:/drev/{if ('Familie' in genres) {'Kids Series'} else if ('Children' in genres) {'Kids Series'} else 'Series'}/{az}/{n}.({y})/Season {s00}/{n} - {s00e00} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}
Post Reply