streamaserver / streama

Self hosted streaming media server. https://docs.streama-project.com/
MIT License
9.67k stars 986 forks source link

[Feature Request] Import age restriction from IMDB for restricting movies #974

Open LukeSteward opened 4 years ago

LukeSteward commented 4 years ago

I have read through the issues and cannot see one that directly asks for this.

  1. The ability to see the current age restrictions on a film / series I don't know if it is possible to retrieve this from the API call to TheMovieDB. An Example: image

  2. Restricting a user/ profile to only be allowed to watch up to a certain age content this would be a lot like the child feature however would allow for children or teens to watch content without being on the unrestricted non child account. One of the issues I think maybe the tiers of access the movie/film age restrictions vary around the world so in the UK we have U, PG, 13, 15 and 18 where as in the US they have G, PG, PG-13, R and NC-17. I am not sure if this could be addressed in translations somehow?

E.g.: User 2 is set to 13 so will be allowed to view content rated U, PG and 13 content. This would affect all profiles on User 2 stopping them from viewing content that is over age 13.

Some possible examples: image image

Profiles: image image

I don't know how to start to implement this I was able to make those screenshots by editing the HTML so this is not a PR.

coatmaker618 commented 4 years ago

I love this idea, and would like to see it implemented too :)

I also love that you made the HTML changes to make these screenshots!! While it may not plugin to anything, that's not trivial!

I did a quick search and while it looks like its far from intuitive, it seems that you CAN get the "MPAA rating" of a movie from TMDB. See forum discussion here: https://www.themoviedb.org/talk/582e1dce925141095400cca6

I gave the recommended query a try by looking up Hobbs & Shaw as my example.

URL query: https://api.themoviedb.org/3/movie/384018?api_key=APIKEY&language=en-US&append_to_response=release_dates

The result is a rather large JSON file--so here is the (semi) relevant part of returned result: "release_dates": { "results": [ { "iso_3166_1": "FR", "release_dates": [ { "certification": "U", "iso_639_1": "", "note": "", "release_date": "2019-08-07T00:00:00.000Z", "type": 3 } ] }, { "iso_3166_1": "US", "release_dates": [ { "certification": "PG-13", "iso_639_1": "", "note": "", "release_date": "2019-08-02T00:00:00.000Z", "type": 3 },

As you can see, you eventually get to "certification" which has the rating. Interestingly, they seem to have 4 different results for the US alone (though they all agree), and apparently different rating systems for other countries too--just to further complicate things.

coatmaker618 commented 4 years ago

On further research, wikipedia (as always) has a page titled "Motion picture content rating" with a nice table of country & age...which should at least bound the rating system issue ;)

@LukeSteward maybe you have some insight on how to present this choice to the users? As we're now asking them to choose a rating system (probably by choosing a country)?

There's also the question of how to get this table into Streama. Maybe just have a button to query wikipedia for updates on the admin page?

dularion commented 3 years ago

I Suggest we stick to the default certification system returned by tmdb for now, that way its quicker to implement in an alpha version and if we eventually need to make this more cross-country we can always add on from there