How to get the certification of a different region?

Any questions? Need some help?
Post Reply
DocG
Posts: 3
Joined: 10 May 2015, 00:16

How to get the certification of a different region?

Post 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!
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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:
:idea: Please read the FAQ and How to Request Help.
DocG
Posts: 3
Joined: 10 May 2015, 00:16

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

Post 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.
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

For r2936+

Code: Select all

{any{ info.certifications.AU }{ info.certifications.US }{ 'No Certification' }}
:idea: Please read the FAQ and How to Request Help.
DocG
Posts: 3
Joined: 10 May 2015, 00:16

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

Post by DocG »

Thanks for this! Much appreciated!
Post Reply