Page 1 of 1

How to get the certification of a different region?

Posted: 10 May 2015, 00:43
by DocG
Hello,

Probably a very stupid question with a very simple answer but I've been utterly unsuccessful in finding any info on it.

Ok, so here's a simple format I'd like to use:

"{certification}/{n} ({y})/{n} ({y})"

Taking the example of "The Hunger Games Mockingjay - Part 1 (2014)" what I'd get with the default (US) is:

PG-13/The Hunger Games Mockingjay - Part 1 (2014)/The Hunger Games Mockingjay - Part 1 (2014).mkv

What I'd really want is the following (AU):

M/The Hunger Games Mockingjay - Part 1 (2014)/The Hunger Games Mockingjay - Part 1 (2014).mkv

Could somebody please let me know what changes I need to make to my format string in order to achieve this, or better, point me to the relevant documentation?

Thank You!

Re: How to get the certification of a different region?

Posted: 10 May 2015, 06:02
by rednoah
Not supported. Not sure if that information is even in the database.

EDIT:

Unofficially:

Code: Select all

{net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, new Locale('en', 'AU'), true).certification}
EDIT:

Starting with r2936 you can do:

Code: Select all

{info.certifications.AU}

Donation appreciated. :ugeek:

Re: How to get the certification of a different region?

Posted: 10 May 2015, 07:31
by DocG
Thanks, that unofficial version actually worked!

Edit: Guess now I need to script this so it takes AU, and if there's nothing in AU it takes US, and only if there's nothing in US it throws it in with Unrated.

Re: How to get the certification of a different region?

Posted: 10 May 2015, 07:54
by rednoah
For r2936+

Code: Select all

{any{ info.certifications.AU }{ info.certifications.US }{ 'No Certification' }}

Re: How to get the certification of a different region?

Posted: 10 May 2015, 09:54
by DocG
Thanks for this! Much appreciated!