Store language(s) from MediaInfo (1 Viewer)

barneh

MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Finally ltfearme...

    Attach you will find the tested code for setting the Special episode as Watched.

    I have also looked into how artwork are fetched. And as I can see it is only fetched all the English artwork. Why? I haven't figure that out yet :(
    Because there are no language used when fetching the artwork, so I don't understand why it's not fetching other languages. But I see that this feature can be useful, but I have also seen artwork on thetvdb.com uploaded/ marked with the wrong language...
     

    Attachments

    • CountSpecialAsWatchedv2.patch
      6.1 KB
    Last edited:

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    IT definitely picks up artwork from different languages, at least it did when originally implemented. Check out GetBanner.cs and see if it correctly compares again your chosen language.

    Code:
      public int CompareTo(T other)
      {
      // Sort by:
      // 1. Local Language
      // 2. Highest Rated
      // 3. Number of Votes
    
      double thisArtwork = this.Language == OnlineAPI.SelLanguageAsString ? 100.0 : 0.0;
      double otherArtwork = other.Language == OnlineAPI.SelLanguageAsString ? 100.0 : 0.0;
    
      if (this.Rating == other.Rating)
      {
      thisArtwork += this.RatingCount;
      otherArtwork += other.RatingCount;
      }
    
      thisArtwork += this.Rating;
      otherArtwork += other.Rating;
    
      return otherArtwork.CompareTo(thisArtwork);
      }

    There is a actually a bug in that code, but it would be a slim chance of hitting it. It basically gives more weight to artwork of your preferred language and its rating, it does the job but could be improved.

    The key point for you to check is if OnlineAPI.SelLanguageAsString is correct and all the language property of the poster is correct, that is assigned here:
    Code:
    seriesPoster.Language = banner.SelectSingleNode("Language").InnerText;
     
    Last edited:

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    You right, it does... I was looking through the code a little bit more after I posted.. since I was confused about how it worked!
    And the DownloadBanner method takes a onlineLanguage as a parameter, and that parameter is always "en".
    That's why it download other artwork, but delete the since it is not the "right" language.

    I'll make a fix for the artwork to :)
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Is that a regression from your patch? It must be as someone else would of complained by now :)
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Well.. It can be...
    My patch works, for series and it's data, but the artwork will be in a wrong language.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I committed your patch, if you can make sure you do a get so your local is aligned that would be great.

    I haven't look at you patch yet, but will test with the default behaviour and make sure it still works as expected when I get a chance. Guess the key thing to test is that if you do have a special which is watched then that special is counted as watched.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I think you have a logic bug because I have my episodes counted as watched for everything at the series level.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    See attachments, its correct at the season level but wrong at the series level. It should report 19 unwatched and 1 watched at the series level.

    Just to be clear, I have only watched a single special.
     

    Attachments

    • season.jpg
      season.jpg
      461.2 KB
    • series.jpg
      series.jpg
      527.6 KB

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Okay... That was strange.... I will take a look at it!
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    I think you have a logic bug because I have my episodes counted as watched for everything at the series level.

    Hmm.... I don't get that behaviour :(
    You should have had 10 unwatched and 10 watched with the feature ON, and 19 unwatched and 1 watched with the feature OFF in Series view.

    As you see in my run I get for "Kampen om Tungtvannet" 5 unwatched and 2 watched with the feature ON, and 6 unwatched and 1 watched with the feature OFF in Series view.
     

    Attachments

    • Season_with_count_special_ON.PNG
      Season_with_count_special_ON.PNG
      1.8 MB
    • Series_with_count_special_OFF.PNG
      Series_with_count_special_OFF.PNG
      2.2 MB
    • Series_with_count_special_ON.PNG
      Series_with_count_special_ON.PNG
      2.7 MB

    Users who are viewing this thread

    Similar threads

    I have looked at your log files, but as usual they are unintelligible gobbledegook. (I am sure that the original developers who wrote that code know what the log entries mean, but those developers have long since retired from the MP team.) I regret to say that I think that you will have to use the "brute force" method to track down...
    I have looked at your log files, but as usual they are unintelligible gobbledegook. (I am sure that the original developers who...
    Sometimes when displaying the OSD whilst playing a recorded TV show the video freezes and the sound continues for about 30 seconds...
    Replies
    1
    Views
    601
    (egg in face) I had to dnld SD plugin mpe1 to re install. trying again Thnx
    (egg in face) I had to dnld SD plugin mpe1 to re install. trying again Thnx
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Replies
    40
    Views
    4K
    Installing other software, especially MP1, which is partly sharing Tv service with MP2, can make everything worse. Please upload your debug log files, if you want to solve the issue.
    Installing other software, especially MP1, which is partly sharing Tv service with MP2, can make everything worse. Please upload...
    Before you create this bug report: Make sure that your system (Windows, codecs and drivers) is up to date, matching the...
    Replies
    6
    Views
    970
    Works also, removed the "section" entry from MediaPortal.xml ;) (y)
    Works also, removed the "section" entry from MediaPortal.xml ;) (y)
    This plugin is alternate version to the original World Weather plugin developed by @Micropolis. Is compatible with MediaPortal...
    Replies
    33
    Views
    3K
    oops! here it is. Corrected xml
    oops! here it is. Corrected xml
    Before you create this bug report: Make sure that your system (windows, codecs and drivers) is up to date, matching the...
    Replies
    2
    Views
    725
    Top Bottom