Feature request: Parental Guide (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,698
    7,083
    Sydney
    Australia Australia
    Country flag
    • Thread starter
    • Moderator
    • #1
    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?


     

    emphatic

    Design Group
  • Team MediaPortal
  • August 25, 2006
    3,602
    1,093
    Alingsås
    Sweden Sweden
    Country flag
    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
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,345
    1,824
    Country flag
    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 :)
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,345
    1,824
    Country flag
    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.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,698
    7,083
    Sydney
    Australia Australia
    Country flag
    • Thread starter
    • Moderator
    • #5
    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 :)
    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.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,345
    1,824
    Country flag
    Hey @ltfearme, that was a doozy, here is the RegExp:

    Code:
    <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:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,345
    1,824
    Country flag
    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. ;)
    I'll use that as new release slogan "IMDb+ Parental Guide... for those cloudy/senile moments" :D
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,698
    7,083
    Sydney
    Australia Australia
    Country flag
    • Thread starter
    • Moderator
    • #8
    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.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,345
    1,824
    Country flag
    @ltfearme, perfect, be sure to take time first to relax first though as those Mondays sneak up fast and can be deadly.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    12,065
    6,851
    Kyiv
    Ukraine Ukraine
    Country flag
    In MyVideo 1.19 :)
    upload_2018-4-26_22-58-47.png
    XML:
        <control Style="textBoxDetails">
          <description>MPAA value</description>
          <type>textboxscrollup</type>
          <id>53</id>
          <posX>1020</posX>
          <posY>670</posY>
          <height>180</height>
          <width>800</width>
          <onleft>2</onleft>
          <onright>2</onright>
          <onup>2</onup>
          <ondown>2</ondown>
          <label>#mpaatext</label>
          <seperator>---------------------------------------------------------------------------------------------------------</seperator>
          <animation effect="fade" time="250">WindowOpen</animation>
          <animation effect="fade" time="250">WindowClose</animation>
          <animation effect="fade" time="250" condition="!control.hasfocus(456852)">conditional</animation>
        </control>
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom