Comments (17)
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.
- G
- PG
- PG-13
- R
- NC-17
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
from php4dvd.
Okay, will add it into the next release (no ETA).
PG-15 = Parental Guidance 15 Years.
PG-0 = Parental Guidance 0 Years.
...
from php4dvd.
I think it's about time for a update.
- Map based on "Motion picture content rating system" (not 100% validated)
- Preferred rating system (countries)
- Fallback (age = 21)
- Storing MPAA as Country:Rating in database
- Storing "Preferred" => "Available" (First match in "map") => Fallback (age = 21) as pg in database
- Upgrade script (new sql)
- Slider in sidebar
- Search based on slider
- Print PG-0 / PG-7 ... in collection layouts
- Print PG-0 / PG-7 on movie
from php4dvd.
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.
from php4dvd.
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?
from php4dvd.
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
from php4dvd.
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/
from php4dvd.
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?
from php4dvd.
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
from php4dvd.
Sounds very nice!
In my opinion it should be enough to display the age instead of the rating even it is filtered by age.
from php4dvd.
Thanks for the translation. I have added some more translations strings, just wanted to check if these (Zertifikat and jahre) are OK (Google translate).
from php4dvd.
"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
from php4dvd.
Ok. Thanks.
from php4dvd.
@Bloodsoul Version 2.6.0 is now live. Please test it and report back too me.
from php4dvd.
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.
from php4dvd.
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;
from php4dvd.
I have submitted a patch for this bug. You can now lower $settings["parental_guidance"]["age"]
into 18.
from php4dvd.
Related Issues (20)
- Filter movie/tv-shows by "Language" HOT 4
- Progress HOT 1
- Favorites for an individual user HOT 1
- Easy way to configure defaults for "seen" and "favorite" HOT 1
- Add scraping support for tmdb.org HOT 1
- Top 250 and 100 HOT 1
- How do I get a selection to stream? HOT 1
- Search not working properly on mobile HOT 2
- No Poster/Cover Art HOT 2
- [FEATURE] Add TMDB as default for poster HOT 1
- Chinese is not supported HOT 2
- Poster image does not download/update from IMDB if one already exists... HOT 3
- $movies[m] HOT 2
- How to modify the software? (add / remove metadata) HOT 7
- Deprecation warnings on PHP 8.1 HOT 4
- Fatal error when adding movie from IMDB on PHP 8.1 HOT 2
- Unable to add new item HOT 2
- Troubleshooting HOT 1
- MYSQL Fields not Created Correctly During Install HOT 1
- Wish List HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php4dvd.