[Approved] IMDB with AKA script (1 Viewer)

Deda

Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Croatia Croatia
    Country flag
    Here I will post new IMDB with AKA scripts if any changes or bugfix occur. You will see two scripts:

    V 1.1.1 -> compatible from MP 1.1.1 to lower versions

    &

    V 1.2.x -> for MP versions 1.2.0 and above.

    Use the version which corresponds to your MP version.

    HF.

    LOG
    14.10.2010
    [collapse]
    Fix for local title name (annoying new IMDB website feature). Negative side of this is that foreign movie titles will be presented in it's original language titles.
    [/collapse]
    20.10.2010
    [collapse]
    Cast and role cosmetic fix (unneeded spaces removed, usually visible in cartoons).
    [/collapse]
    23.10.2010
    [collapse]
    Exception fix in movie run-time parsing.
    [/collapse]
    20.12.2010
    [collapse]
    Ratings rework. Now it will take IMDB (MPAA rating as default if no user country rating found. If both fails, it will work as before.)
    [/collapse]
    10.01.2011
    [collapse]
    Ratings bug fix.
    [/collapse]
    27.02.2011
    [collapse]
    Will try to get English title for non-english movies (it will use TMDB API to get title).
    If you don't want this, just open script in notepad and do search for:

    bool tryEng = true;

    and change it to:

    bool tryEng = false;

    [/collapse]
    07.03.2011
    [collapse]
    Small ENG title bug fix
    [/collapse]
    09.03.2011
    [collapse]
    Wrong title characters encoding fix, role cleaned from non wanted txt
    [/collapse]
    11.01.2012
    [collapse]
    Fixed scripts according to new html changes in IMDB
    [/collapse]
     

    Attachments

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Croatia Croatia
    Country flag
    Small update (cosmetic fix in cast and roles, unwanted spaces removed).
     

    xvffx

    Portal Pro
    August 15, 2007
    313
    53
    Canada Canada
    thanks Deda,

    I was wondering when 1.2.0 is out, do we use this or click the update from the config?

    Don't want to miss out all your neat features by using the wrong one :)


    Vff
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Croatia Croatia
    Country flag
    Ofc goal is to use update from config, but I just need to resolve MP version compatibility issue (maybe to use MP version check in script to skip new features for old MP). Surely, will be ready when 1.2.0 became official.
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,862
    741
    Seoul.
    South Korea South Korea
    Country flag
    hi Deda ! how are you ?

    i will like to mod the scrrpt a little bit , and i dont know if it's o,k to use this trhed ....?

    things i like to mod :
    1. like to get 1 director .
    2. like to get 1 writer .
    3. like to get only (G,PG,PG-13,R) in mpaa rating feild ,only the pg-13 with no contry (like now USA PG-13)
    4.like to cancle user review .
    5.like to get the sort summry , as i know IMDB web they have what they call sort summry and long summry ,(i dont means tagline)
    the sort summry is in the main page ..usly 2~3 line of summry .
    6. in Gener i like to chage the / bitwin the gener to , (now Action / Drama to be Action , Drama )

    if you can give me some info abut wich lines to change ...i'm sure i can do it my self ...

    Thanks in adveance ....:)

    Edit : can cancle no. 6 (i play with the script and find wher to do it ... :) ... 5 more things to go ....
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Croatia Croatia
    Country flag
    Just wait a little, I'm doing little changes in script so it can be compatible with all versions of MP, also rating will be USA as default if user country rating isn't listed (little team discussion). User review is separated from plot in version 1.2.0 Beta (new button in Movie Info screen).

    For q 1 and 2 it's not easy to answer you really need to do it by yourself (need some regex knowledge and little C# coding skill).

    For q 5 there short summary is already inside script and the database:

    Code:
    // Plot short
    regexPattern =
            @"<h5>Plot:</h5>[^>]+>\s+?(?<moviePlotShort>.+?)(?: \|)?\s+?<a|Users:.*?<p>(?<moviePlotShort>.+?)</p>";
    string shortPlot = Regex.Match(strBody, regexPattern, RegexOptions.Singleline).Groups["moviePlotShort"].Value;
    movieDetails.PlotOutline = HttpUtility.HtmlDecode(Utils.stripHTMLtags(shortPlot));
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,862
    741
    Seoul.
    South Korea South Korea
    Country flag
    Just wait a little, I'm doing little changes in script so it can be compatible with all versions of MP, also rating will be USA as default if user country rating isn't listed (little team discussion). User review is separated from plot in version 1.2.0 Beta (new button in Movie Info screen).

    For q 1 and 2 it's not easy to answer you really need to do it by yourself (need some regex knowledge and little C# coding skill).

    For q 5 there short summary is already inside script and the database:

    Code:
    // Plot short
    regexPattern =
            @"<h5>Plot:</h5>[^>]+>\s+?(?<moviePlotShort>.+?)(?: \|)?\s+?<a|Users:.*?<p>(?<moviePlotShort>.+?)</p>";
    string shortPlot = Regex.Match(strBody, regexPattern, RegexOptions.Singleline).Groups["moviePlotShort"].Value;
    movieDetails.PlotOutline = HttpUtility.HtmlDecode(Utils.stripHTMLtags(shortPlot));

    hi Deda ! i'm little confuse .... right now the code in skin file for summry is #plot (wich is the longer summry)

    so what will be the code for short plot ?? i try #shortplot and #plotshort but non of them work ..

    is thir a skin id's and lable list ,for my videos plugin ? i serch but canot find ...
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Croatia Croatia
    Country flag
    Try #plotoutline.
    Skin control id's for movie info screen is the following (from GUIVideoInfo.cs):

    Code:
        [SkinControl(2)] protected GUIButtonControl btnPlay = null;
        [SkinControl(3)] protected GUIToggleButtonControl btnPlot = null;
        [SkinControl(4)] protected GUIToggleButtonControl btnCast = null;
        [SkinControl(5)] protected GUIButtonControl btnRefresh = null;
        [SkinControl(6)] protected GUIToggleButtonControl btnWatched = null;
        [SkinControl(7)] protected GUIToggleButtonControl btnReview = null; // Valid for v 1.2.0 and above
        [SkinControl(10)] protected GUISpinControl spinImages = null;
        [SkinControl(11)] protected GUISpinControl spinDisc = null;
        [SkinControl(20)] protected GUITextScrollUpControl tbPlotArea = null;
        [SkinControl(21)] protected GUIImage imgCoverArt = null;
        [SkinControl(22)] protected GUITextControl tbTextArea = null;
        [SkinControl(23)] protected GUITextScrollUpControl tbReviwArea = null;
        [SkinControl(30)] protected GUILabelControl lblImage = null;
        [SkinControl(100)] protected GUILabelControl lblDisc = null;
    and all defined properties (from IMDBMovie.cs)::

    Code:
         GUIPropertyManager.SetProperty("#director", Director);
          GUIPropertyManager.SetProperty("#genre", Genre);
          GUIPropertyManager.SetProperty("#cast", Cast);
          GUIPropertyManager.SetProperty("#dvdlabel", DVDLabel);
          GUIPropertyManager.SetProperty("#imdbnumber", IMDBNumber);
          GUIPropertyManager.SetProperty("#file", File);
          GUIPropertyManager.SetProperty("#plot", Plot);
          GUIPropertyManager.SetProperty("#plotoutline", PlotOutline);
          GUIPropertyManager.SetProperty("#userreview", UserReview);  // Valid for v 1.2.0 and above
          GUIPropertyManager.SetProperty("#rating", Rating.ToString());
          GUIPropertyManager.SetProperty("#tagline", TagLine);
          GUIPropertyManager.SetProperty("#votes", Votes);
          GUIPropertyManager.SetProperty("#credits", WritingCredits);
          GUIPropertyManager.SetProperty("#thumb", strThumb);
          GUIPropertyManager.SetProperty("#title", Title);
          GUIPropertyManager.SetProperty("#year", Year.ToString());
          GUIPropertyManager.SetProperty("#runtime", RunTime.ToString());
          GUIPropertyManager.SetProperty("#mpaarating", MPARating);
          string strValue = "no";
          if (Watched > 0)
          {
            strValue = "yes";
          }
          GUIPropertyManager.SetProperty("#iswatched", strValue);
    But this should be discussed somewhere else because it's more skin related then script changes :).
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Denmark Denmark
    I'm thinking...could we empty the #iswatched string for folders? It doesn't make much sense anyways :)
     

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

    Top Bottom