Feature request: Parental Guide

Discussion in 'IMDb+' started by ltfearme, April 25, 2018.

  1. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,458
    Likes Received:
    4,245
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,389 / 0
    Home Country:
    Australia Australia
    Hey @RoChess,



    we discussed this briefly once upon a time, but I would like to add a new window/dialog to IMDb+ plugin which once activated loads corresponding movies Parents Guide e.g.
    Parents Guide - IMDb

    I can do all the coding needed, all I need from you would be the RegEx required for each section on that page type e.g. RegEx for :
    * Sex & Nudity;
    * Violence & Gore;
    *
    Profanity;
    * Alcohol, Drugs & Smoking;
    * Frightening & Intense Scenes.

    Each of those sections would need at least 4 different regex e.g.

    1. Text describing the section e.g. "Expect violence and action sequences like the previous movie..."
    2. Severity e.g. "Mild|Severe|etc"
    3. SeverityCountText e.g. 11 of 47 found this mild
    4. SeverityCountPerType e.g. None=2, Mild=7 etc

    Really only 'Text' is the most important out of all that, the rest could be added in future version.

    There are other text blurbs on that page worth getting, but the main items are mentioned above. The window can be completely skinnable and can re-use the artwork from the corresponding movie window whether that be MovingPictures or Trakt or other video plugin.

    I know a page like this would be extremely useful for my family esp. with 4 kids at different ages making it almost impossible for movie nights. Not sure how useful anyone else would find a feature?


     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. emphatic
    • Team MediaPortal

    emphatic Design Group

    Joined:
    August 25, 2006
    Messages:
    3,586
    Likes Received:
    828
    Gender:
    Male
    Occupation:
    Surface treatment
    Location:
    Alingsås
    Ratings:
    +1,083 / 2
    Home Country:
    Sweden Sweden
    Show System Specs
    I use Parents guide a lot as I have a 13 year old, and 11 year old and a 5 year old. Some movies are rated as 15+ in Sweden, but when you read the Parent's Guide, it really does away with any doubts if you wanna watch Raiders Of The Lost Ark and your memory is cloudy. ;)

    Emph
     
    • Agree Agree x 1
  4. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    Hey @ltfearme so wouldn't this be better if you expand MovPic with added fields, and then I just scrape this information and add it to the MovPic dbase? That way MovPic filters, categories, and all the other fancy stuff can immediately rely on this to for example lists all movies that contain nudity, I mean do not contain nudity hehehe :)
     
    • Great Idea! Great Idea! x 1
  5. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    Something like (first would be the main MPAA one to supplement existing movie.rating):
    1. Parent Guide Description = "intense sequences of sci-fi violence and action throughout, language and some crude references"
    2. Parent Sex = ""
    3. Parent Sex Rating = "Mild"
    4. Parent Sex Popularity = "11 out of 52"
    5. Parent Violence = "Expect violence and action sequences like the previous movies"
    6. Parent Violence Rating = "Moderate"
    7. Parent Violence Popularity = "17 out of 31"
    8. Parent Profanity = ""
    9. Parent Profanity Rating = "Mild"
    10. Parent Profanity Popularity = "18 out of 42"
    11. Parent Addiction = ""
    12. Parent Addiction Rating = "None"
    13. Parent Addiction Popularity = "12 out of 23"
    14. Parent Scary = "intense sequences of sci-fi action, violence and destruction, peril, and some language"
    15. Parent Scary Rating = "Moderate"
    16. Parent Scary Popularity = "8 out 32"

    As for actual RegExp, that can even be all done in a single array one if needed, depending on how you do it at C# level to execute the RegExp results.
     
    • Like Like x 1
  6. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,458
    Likes Received:
    4,245
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,389 / 0
    Home Country:
    Australia Australia
    It could go both ways, we could add an extra DB table or more fields to the existing one but I don't think there is any other scraper that will give you as much information as IMDb.com.

    I think the Parents Guide is unique to IMDb and would be nice to expose it as a full feature in IMDb+. There is certainly value in adding fields to MovPics for filtering to get movies with Nudity and not Nudity too RoChess ;)

    Regarding the RegEx, a single array is fine.
     
    • Like Like x 1
  7. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    Hey @ltfearme, that was a doozy, here is the RegExp:

    Code (Text):
    1. <section id="(?<advisory_title>[^"]+)">\s*<h4[^/]+/h4>\s*<ul[^/]+/>\s*<[^<]+<[^<]+<span[^>]+>(?<advisory_suggestion>[^<]+)</span>\s*<a[^>]+>\d+ of (?<advisory_total_votes>\d+)[^<]+</a>.+?(?:\s*<span[^<]+<button class="ipl-vote-button__button" value="(?<advisory_severity>[^"]+)"[^/]+/[^"]+[^>]+>(?<advisory_severity_vote>\d+)</span>\s*</span>){1,}

    It will return a multi-dimensional array.

    1st match:

    advisory_title = "advisory-nudity"
    advisory_suggestion = "Mild"
    advisory_total_votes = "54"
    advisory_severity = array [ "none", "mild", "moderate", "severe" ]
    advisory_severity_vote = array [ "26", "13", "0", "15" ]
    2nd match:

    advisory_title = "advisory-violence"
    advisory_suggestion = "Moderate"
    advisory_total_votes = "32"
    advisory_severity = array [ "none", "mild", "moderate", "severe" ]
    advisory_severity_vote = array [ "3", "6", "18", "5" ]
    3rd+, you get the idea​
     
    Last edited: April 26, 2018
    • Like Like x 2
  8. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    I'll use that as new release slogan "IMDb+ Parental Guide... for those cloudy/senile moments" :D
     
    • Funny Funny x 2
  9. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,458
    Likes Received:
    4,245
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,389 / 0
    Home Country:
    Australia Australia
    Thanks @RoChess,

    Hopefully I can start on this feature this weekend...either way, when im done I will create a pull request on GitHub and post here a preview.
     
    • Thank You! Thank You! x 1
  10. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    @ltfearme, perfect, be sure to take time first to relax first though as those Mondays sneak up fast and can be deadly.
     
    • Agree Agree x 2
  11. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,706
    Likes Received:
    2,693
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,658 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    In MyVideo 1.19 :)
    upload_2018-4-26_22-58-47.png
    Code (XML):
    1.     <control Style="textBoxDetails">
    2.       <description>MPAA value</description>
    3.       <type>textboxscrollup</type>
    4.       <id>53</id>
    5.       <posX>1020</posX>
    6.       <posY>670</posY>
    7.       <height>180</height>
    8.       <width>800</width>
    9.       <onleft>2</onleft>
    10.       <onright>2</onright>
    11.       <onup>2</onup>
    12.       <ondown>2</ondown>
    13.       <label>#mpaatext</label>
    14.       <seperator>---------------------------------------------------------------------------------------------------------</seperator>
    15.       <animation effect="fade" time="250">WindowOpen</animation>
    16.       <animation effect="fade" time="250">WindowClose</animation>
    17.       <animation effect="fade" time="250" condition="!control.hasfocus(456852)">conditional</animation>
    18.     </control>
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!