Store language(s) from MediaInfo | Page 5

Discussion in 'My TVSeries' started by Edalex, January 31, 2015.

  1. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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...
     

    Attached Files:

    Last edited: March 23, 2015
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,457
    Likes Received:
    4,241
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,385 / 0
    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 (Text):
    1.  
    2.   public int CompareTo(T other)
    3.   {
    4.   // Sort by:
    5.   // 1. Local Language
    6.   // 2. Highest Rated
    7.   // 3. Number of Votes
    8.  
    9.   double thisArtwork = this.Language == OnlineAPI.SelLanguageAsString ? 100.0 : 0.0;
    10.   double otherArtwork = other.Language == OnlineAPI.SelLanguageAsString ? 100.0 : 0.0;
    11.  
    12.   if (this.Rating == other.Rating)
    13.   {
    14.   thisArtwork += this.RatingCount;
    15.   otherArtwork += other.RatingCount;
    16.   }
    17.  
    18.   thisArtwork += this.Rating;
    19.   otherArtwork += other.Rating;
    20.  
    21.   return otherArtwork.CompareTo(thisArtwork);
    22.   }  
    23.  
    24.  
    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 (Text):
    1.  
    2. seriesPoster.Language = banner.SelectSingleNode("Language").InnerText;
    3.  
     
    Last edited: March 24, 2015
  4. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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 :)
     
  5. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,457
    Likes Received:
    4,241
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,385 / 0
    Home Country:
    Australia Australia
    Is that a regression from your patch? It must be as someone else would of complained by now :)
     
  6. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    Well.. It can be...
    My patch works, for series and it's data, but the artwork will be in a wrong language.
     
  7. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,457
    Likes Received:
    4,241
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,385 / 0
    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.
     
  8. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,457
    Likes Received:
    4,241
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,385 / 0
    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.
     
  9. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,457
    Likes Received:
    4,241
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,385 / 0
    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.
     

    Attached Files:

    • season.jpg
      season.jpg
      File size:
      461.2 KB
      Uploaded:
      March 24, 2015
      Views:
      87
    • series.jpg
      series.jpg
      File size:
      527.6 KB
      Uploaded:
      March 24, 2015
      Views:
      85
  10. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    Okay... That was strange.... I will take a look at it!
     
  11. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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.
     

    Attached Files:

Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!