I don't use MPAA ratings and I don't use Windows, so I haven't got a complete script for you. However, the following might get you started.
I think the essential step is to find the rating of a specific movie. As a prototype, I made a one-liner on Linux, that reports the rating. See examples below:
Code: Select all
sander@R540:~$ lynx --dump 'https://www.google.nl/search?q=the+dark+knight%3Aimdb.com+parentalguide' | grep -i www.imdb.com | head -1 | awk '{ print "lynx --dump " $1 " | grep Rated" }' | /bin/sh
Rated PG-13 for intense sequences of violence and some menace
sander@R540:~$ lynx --dump 'https://www.google.nl/search?q=the+hunger+games+site%3Aimdb.com+parentalguide' | grep -i www.imdb.com | head -1 | awk '{ print "lynx --dump " $1 " | grep Rated" }' | /bin/sh
Rated PG-13 for intense violent thematic material and disturbing images
sander@R540:~$ lynx --dump 'https://www.google.nl/search?q=The+Girl+with+the+Dragon+Tattoo+site%3Aimdb.com+parentalguide' | grep -i www.imdb.com | head -1 | awk '{ print "lynx --dump " $1 " | grep Rated" }' | /bin/sh
Rated R for brutal violent content including rape and torture, strong
sander@R540:~$ lynx --dump 'https://www.google.nl/search?q=101+dalmatians+site%3Aimdb.com+parentalguide' | grep -i www.imdb.com | head -1 | awk '{ print "lynx --dump " $1 " | grep Rated" }' | /bin/sh
So, in the above you see 4 queries for 4 different movies. You can see the name of the movie in the google search and you can the Rating found. The fourth movie (101 dalmations) has no rating. Is that correct?
Explanation of the one-liner:
First it does a search on google for the movie, asking for only links on imdb.com with those movie words and including the word "parentalguide". Then it extracts only lines with
http://www.imdb.com in them. It then picks the first line. It uses the URL in that line to get that page, and only find the line with "Rated" in it.
If you understand and like the above, the next question is how to get the movie name from your download. It could be in the directory or file name, but extra's like "DVDR", "Promo_XVID", "Season 01" or "subtitles included" have to be excluded from the first Google search. Or maybe your directory are more clean by themselves, and can be punt into the Google search without any stripping?