automating foreign and kids movies

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
aaseef021
Posts: 53
Joined: 08 Nov 2017, 04:08

automating foreign and kids movies

Post by aaseef021 »

Is there a way to automatically detect kids movies or foreign movies and put them into the right folders, for example

When completed
Miss Bala, Roma, Coco, Finding Nemo

After completion move to
Foreign = Miss Bala and Roma

Kids= Coco and findnemo

Right now I do a manual drag and drop in the the correct folder when completed. I tried looking if there is a way looking at the TAG of the file, meta data, but there is nothing consistent in the metadata that would help accomplish this.

My script is as follow

Code: Select all

filebot -script fn:amc --output "/data/Videos" --action copy --conflict override -non-strict --log-file amc.log --def clean=y artwork=y excludeList=amc.txt "/data/Torrents/Completed"
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: automating foreign and kids movies

Post by kim »

try

Code: Select all

{genres.contains(/Animation/) ? 'Kids': !languages[0].toString().contains(/eng/) ? 'Foreign' : 'other'}
other you can look at

Code: Select all

{info.ProductionCountries}{info.SpokenLanguages}{info.OriginalLanguage}

Code: Select all

{genres.contains(/Animation/) ? 'Kids': !languages[0].toString().contains(/eng/) || info.ProductionCountries.contains(/MX/) ? 'Foreign' : 'other'}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automating foreign and kids movies

Post by rednoah »

Well, the first problem you will encounter is that your goal is not clearly defined, and it's definitely a matter of degree in many cases, and different people might make different decisions.


e.g. "Kids Movies" is not defined by "Coco or Finding Nemo" but "Movies that are kinda like Coco or Finding Nemo". If I give you a random movie, what thought process will you apply to identify this movie as "Kids Movie" or "Normal Movie"?


Unfortunately, I'm not aware any of any online metadata that would tag movies as "kids" or "foreign", but the existing metadata is definitely good enough for some basic heuristics that'll probably mostly work. @kim already gave you a good starting point for that. ;)
:idea: Please read the FAQ and How to Request Help.
aaseef021
Posts: 53
Joined: 08 Nov 2017, 04:08

Re: automating foreign and kids movies

Post by aaseef021 »

thank you Rednose and Kim for you help, this will help me get started. What you guys think of this, so I am thinking making a python script, thinking of grabbing the information form IMDB, as IMDB displays the following under details and also of the mp4, movies format do not display mush in the meta data.

For foreign - Say if the first language is other than English, it will redirect the movies to foreign folder
For Kids - Say if it states animation or cartoon it stores it within the kids folder

Details
Official Sites: Official Facebook | Official site | See more »
Country: USA
Language: Spanish | English
Release Date: 22 November 2017 (USA) See more »
Also Known As: Untitled Dia de los Muertos Project See more »
Filming Locations: Pixar Animation Studios - 1200 Park Avenue, Emeryville, California, USA See more »
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: automating foreign and kids movies

Post by kim »

my format already does this

btw: (same info on themoviedb)
and it's
"Language: English | Spanish"
so if you got "Language: Spanish | English" you cant trust the order
Last edited by kim on 16 May 2020, 19:53, edited 1 time in total.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: automating foreign and kids movies

Post by devster »

In addition to Kim's suggestion you could look at PG rating of a movie and filter by that.
You probably don't need custom scripts to do what you mentioned as FileBot already has genre and certification as binding, but you'd be relying on The Movie DB, not IMDb.
For languages you can get original language as a binding or get the audio language from MediaInfo, if there is one.
I only work in black and sometimes very, very dark grey. (Batman)
Post Reply