Closed Bloodsoul closed 7 years ago
This is personally something I never will have a use of, but I guess parents might.
IMDb stores ~30 "MPAA" values for every movie. If it's a new one, you generally will get just USA. So if we're going to store it from IMDb you will have to select a default country and then fallback to nothing or USA.
You can make a configurable array with your countries ratings that you will be able to choose from or selected for you, if it matches IMDb.
For the sorting/filter part, I think filtering are the only viable option (like categories). Sort will just do it alphabetical.
Maybe some multiselect (haven't tried it) will work or make it so that PG-13 also matches PG and G.
I think that it will be too much to include images for every content rating on the details page, adding a tag like categories will suffice. Or add it too Rating, Languages...
Referens: https://en.wikipedia.org/wiki/Motion_picture_content_rating_system
This is personally something I never will have a use of, but I guess parents might.
Exactly! And additionally everyone else, who has to browse his movies for a given age e.g. for lending purpose.
If all given ratings on IMDb would be imported, it sure are too much images to show. If a default country can be selected, it will only apply on which one of the imported values will be shown? Sounds nice.
Can this configurable array be used as a priority list? It would be nice to include the highest priority rating information into the collection overview layouts 3 to 5. But then it has to be clear of which rating system this information is from. I don't know what information could be fetched from IMDb itself, maybe only the country and the rating. It should work to include the country only into a mouse over description.
This is the information gathered from "Taken 3". http://www.imdb.com/title/tt2446042/parentalguide?ref_=tt_stry_pg#certification
Country | Rating |
---|---|
Argentina | 13 |
Australia | MA15+ |
Austria | 16 |
Canada | 13+ |
Chile | 14 |
Finland | K-16 |
France | Tous publics |
Germany | 16 |
Hong Kong | IIB |
Ireland | 12A |
Japan | G |
Mexico | B |
Netherlands | 16 |
New Zealand | M |
Philippines | PG-13 |
Portugal | M/12 |
Singapore | PG13 |
South Korea | 15 |
Sweden | 15 |
Switzerland | 14 |
Thailand | 13 |
UK | 15 |
USA | PG-13 |
And I think you need a variable like so $settings["certification"]["country"] = 'Sweden';
.
The array I'm talking about should look something like:
$settings["certification"]["types"] = array(
'Btl',
'7',
'11',
'15'
);
So that php4dvd knows what you are looking for, and supply default suggestions for you. (if not rated on IMDb)
Can this configurable array be used as a priority list? It would be nice to include the highest priority rating information into the collection overview layouts 3 to 5.
Do you mean like selecting different countries from IMDb; Sweden => Norway => USA
Do you need just one rating stored per movie, or are you looking for every available information?
For myself it would be sufficient to only have one single rating per movie.
I thought about anything like this:
$settings["certification countries"] = array('Sweden', 'Germany', 'Norway');
If a swedish rating is present within the data fetched from IMDb, this would be stored on the movie. If not, it looks for a german rating and so on.
Maybe this can also be done with an associative array to define the name of this rating:
$settings["certifications"] = array('Sweden' => 'SMC', 'Germany' => 'FSK', 'Norway' => 'NMA');
I do not know if the names are correct. Someone could name them whoever he is able to differentiate between them when they are displayed.
Movie 1: SMC 11
- has a swedish rating
Movie 2: FSK 12
- don't has a swedish rating
Movie 3: NMA 9
- don't has a swedish nor a german rating
Both examples are doable. Maybe storing the value as Sweden:11, German:12 in the database and let php4dvd translate them too whatever the user puts in; Sweden => SMC, German => FSK.
If we are including three countries (Sweden, German, Norway) you are going to end up with a select for 16 different types of ratings. Because of that you will need to select three different "content rating" for finding movies. Or make a complex cross check array that states that this country rating == another country rating (tedious).
Maybe a "child rating system" are a better approach, that you manually need to set.
Symbol | Description |
---|---|
:-) | Child proof |
:-| | Teen (~11) |
:-( | 15+ |
http://fontawesome.io/icon/smile-o/ http://fontawesome.io/icon/meh-o/ http://fontawesome.io/icon/frown-o/
If we are including three countries (Sweden, German, Norway) you are going to end up with a select for 16 different types of ratings. Because of that you will need to select three different "content rating" for finding movies.
Oh, didn't thought about that. That is definately a problem when filtering. Something like this could be configured:
$settings["certifications"] = array(
"Germany" => array(
0 => "0",
6 => "6",
12 => "12",
16 => "16",
18 => "18");
"Sweden" => array(
0 => "Btl",
7 => "7",
11 => "11",
15 => "15");
);
Filter would be based upon the age and include all configured ratings for lower ages. Maybe the highest index or a seperate configured age should be the maximum filterable age and including all ratings, even if they are not configured.
Alternatively, it could be only one configurable country, as you already mentioned above. But maybe with filter by age instead of string search?
For this to work with multiple countries I think we need to end up with the following.
// Activate it
$settings["certification"]["mpaa"] = true;
// Specify what country/countries you want
$settings["certification"]["country"] = array(
'Sweden',
'Germany',
'USA'
);
// Convert country certification code into age.
// Need to look for IMDb values, therefor they are first.
$settings["certification"]["map"] = array(
'Sweden' => array(
'Btl' => 0,
'7' => 7,
'11' => 11,
'15' => 15
),
'Germany' => array(
'0' => 0,
'6' => 6,
'12' => 12,
'16' => 16,
'18' => 18
),
'USA' => array(
'G' => 0,
'PG' => 7,
'PG-13' => 13,
'R' => 17,
'NC-17' => 18
)
);
$settings["certification"]["age"]["min"] = '0';
$settings["certification"]["age"]["max"] = '21';
php4dvd will then take everything from IMDb and store it into mpaa
in the database and make a pg
field that will contain just the age limitation. If nothing matches it will put $settings["certification"]["age"]["max"]
in there, just to be safe.
mpaa
Sweden:7
Germany:6
USA:PG
pg (matching Sweden first)
7
Would we then just show the age (pg
) on collection overview 3-5?
Filtering will use Bootstrap Slider: https://adminlte.io/themes/AdminLTE/pages/UI/sliders.html
Sounds very nice! In my opinion it should be enough to display the age instead of the rating even it is filtered by age.
Okay, will add it into the next release (no ETA).
PG-15 = Parental Guidance 15 Years. PG-0 = Parental Guidance 0 Years. ...
I think it's about time for a update.
Thanks for the translation. I have added some more translations strings, just wanted to check if these (Zertifikat and jahre) are OK (Google translate).
"Jahre" should start uppercase in general. "Zertifikat" is not really used for what is meant here in german language. Maybe this should instead be "Altersfreigabe" which translates to "age rating".
See also: https://en.wikipedia.org/wiki/Motion_picture_content_rating_system when you switch to the german representation of this page, you'll get to: https://de.wikipedia.org/wiki/Altersfreigabe
Ok. Thanks.
@Bloodsoul Version 2.6.0 is now live. Please test it and report back too me.
I copied the following configuration options from parental.guidance.php over into my config.php:
$settings["parental_guidance"]["mpaa"] = true;
$settings["parental_guidance"]["countries"] = array("Germany");
$settings["parental_guidance"]["age"] = 18;
That results in: IMDb: 0104815 Movie: El Mariachi Age is set to 17 instead of 18
When I set the maximum age to a value higher than 18, it seems to import the correct value.
I'm currently rescanning my whole collection. This will take some time. I'll open up an issue when I find something. Thank you very much.
Yeah, that's due to the following. If IMDb age are the same as your maximum age. It's returning your own value (21 as default). Instead of IMDb. That's a quickfix for the age 21, so it dosen't overwrite a lower value then 21. Looks like I need to hardcode it.
$age = $this->parentalGuidance($imdbmovie->mpaa(),$parental_guidance);
$this->pg = $age === $parental_guidance["age"] ? $this->pg : $age;
I have submitted a patch for this bug. You can now lower $settings["parental_guidance"]["age"]
into 18.
Suggestion: It would be nice to filter and/or sort movies by their content rating.
Since there are many different content ratings out there, and someone could have foreign movies with another content rating, this maybe should be configurable. Maybe with a corresponding image of the content rating label on the details page of a movie.