Store language(s) from MediaInfo (2 Viewers)

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,799
    7,331
    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,799
    7,331
    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,799
    7,331
    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,799
    7,331
    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,799
    7,331
    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

    that really sounds like an authorization issue. do you already have an OpenSubtitlesConfiguration.xml in the programfiles\tean mediaportal\subtitledownloaders folder? there you can fill in your credentials. I'm sure it is documented somewhere...
    that really sounds like an authorization issue. do you already have an OpenSubtitlesConfiguration.xml in the programfiles\tean...
    I'm having a strange issue with Subcentral & Subtitle Downloader. Everytime I try to download subtitles the list come out empty...
    Replies
    3
    Views
    683
    Looks like there's some kind of error regarding translations that I can't pinpoint about Subcentral. You'll find it in the log file I attached to my previous message. I don't understand it because I use MP in english, I search for subtitles in english and not in my native language, so I can't figure out what's translation got to do...
    Looks like there's some kind of error regarding translations that I can't pinpoint about Subcentral. You'll find it in the log file...
    I don't now what to say, I don't know where to begin. Mediaportal user since 2004. Always a satisfied user, I must add. Lately...
    Replies
    21
    Views
    3K
    After many hours of troubleshooting I've given up and accepted that it's just "one of these things" when using madVR for watching live TV. I've now ticked the box to "Use EVR for LiveTV", with a default display refresh rate of 50Hz. In combination with tweaking some of the Nvidia 3D settings for the MP executable only, I now have a...
    After many hours of troubleshooting I've given up and accepted that it's just "one of these things" when using madVR for watching...
    Every so often, when I switch to a TV channel, my MP client stops accepting user inputs, either from the remote or keyboard/mouse...
    Replies
    30
    Views
    9K
    Sadly, it seems that development of MP2 has come to a stop. Perhaps it will restart in the future. Meanwhile... MP1 has a "Tuning Details" panel that displays signal strength, signal quality, and picture resolution. It is updated in real time when viewing a channel: However, perhaps you are already aware of this, but prefer MP2...
    Sadly, it seems that development of MP2 has come to a stop. Perhaps it will restart in the future. Meanwhile... MP1 has a "Tuning...
    For those of us watching broadcast (over-the-air) television, it would be very handy to have a signal strength meter readily...
    Replies
    1
    Views
    4K
    Fixed, I think. Certainly the vintage MP2 installer that I was using no longer installs the LAV filters. I can only assume that these were never part of the install package itself, but rather downloaded during the install, and that link no longer exists. Shame that the installer doesn't indicate this. Last time when I installed the...
    Fixed, I think. Certainly the vintage MP2 installer that I was using no longer installs the LAV filters. I can only assume that...
    Hi all, I've recently retired my MP2 setup for my main HTPC and gone back to separates, but I wanted to retain the ability to play...
    Replies
    4
    Views
    971
    Top Bottom