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,760
    7,224
    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,760
    7,224
    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,760
    7,224
    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,760
    7,224
    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,760
    7,224
    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

    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
    8K
    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
    I'm running 2.5 with the WMC skin. I have .mp4 files, along with the related .srt files in the same folder. I can watch the movies just fine. In past versions of MP, like 2.4x, I could press the More Info button on my remote twice, and on the second press, an option for showing/choosing the subtitles was listed. I'd select the...
    I'm running 2.5 with the WMC skin. I have .mp4 files, along with the related .srt files in the same folder. I can watch the...
    I'm running 2.5 with the WMC skin. I have .mp4 files, along with the related .srt files in the same folder. I can watch the...
    Replies
    0
    Views
    3K
    I do not know why this xml was in my theme folders, it must have sneaked in some time ago (years?). I simply removed the file. The Latest Media Handler plugin seems to be working as expected. I've had no lock-ups.
    I do not know why this xml was in my theme folders, it must have sneaked in some time ago (years?). I simply removed the file. The...
    Before you create this bug report: Make sure that your system (windows, codecs and drivers) is up to date, matching the...
    Replies
    13
    Views
    4K
    I have recently installed MediaPortal 1.37 (x64) and MP-TVSeries v4.5.1.697 and unfortunately the TV episode runtime duration is missing in my Titan skin. This only applies to my .TS files, my .MKV files are OK. I believe the difference is likely to be because .MKV files embed the runtime in the file unlike .TS files. I have done...
    I have recently installed MediaPortal 1.37 (x64) and MP-TVSeries v4.5.1.697 and unfortunately the TV episode runtime duration is...
    I have recently installed MediaPortal 1.37 (x64) and MP-TVSeries v4.5.1.697 and unfortunately the TV episode runtime duration is...
    Replies
    0
    Views
    843
    Top Bottom