2010-09-20, 11:16
Just let the user do the work, create an "Needs Password Include and Exclude List" setting.
So if you have a living room media center situation and want to keep the kids out of your "Rated R" and "PG-13" movies, but let them still watch "G" and "PG"
Put "Rated-R", "Rated-NR" and "PG-13" in the include list
Put "Rated-PG" and "Rated-G" in the exclude list
So if a "PG-13" movie is selected (all of them are seen, only checked against playing), the rating is checked against the strings in include first, then the exclude list, so "PG-13" passes the include list because it has "PG" in it, but fails as it hits the exclude list because "PG-13" is in it. If the lists are text strings, you could put in the MPAA ratings and/or the UK, AU ones as well.
It seems like it would be simpler to code, and would make the functionality based on the user's particular setup.
It doesn't have to be just the ratings field, it could be any of the elements of the database for the entry, Rating,Tagline, Plot, Title, Actor, whatever. So that you could password movies that have the word "Raunchy" or "Sex" in the plot/tagline.
So if you have a living room media center situation and want to keep the kids out of your "Rated R" and "PG-13" movies, but let them still watch "G" and "PG"
Put "Rated-R", "Rated-NR" and "PG-13" in the include list
Put "Rated-PG" and "Rated-G" in the exclude list
So if a "PG-13" movie is selected (all of them are seen, only checked against playing), the rating is checked against the strings in include first, then the exclude list, so "PG-13" passes the include list because it has "PG" in it, but fails as it hits the exclude list because "PG-13" is in it. If the lists are text strings, you could put in the MPAA ratings and/or the UK, AU ones as well.
It seems like it would be simpler to code, and would make the functionality based on the user's particular setup.
It doesn't have to be just the ratings field, it could be any of the elements of the database for the entry, Rating,Tagline, Plot, Title, Actor, whatever. So that you could password movies that have the word "Raunchy" or "Sex" in the plot/tagline.