Stop TV Series from updating Ratings (1 Viewer)

conguero23

Portal Member
December 9, 2012
48
10
44
Home Country
United States of America United States of America
Every time mp is restarted and or it searches for changes it overrides any manual changes to the rating and re-pulls it from the thetvdb.com on an episode level and it hardly ever has ratings.

I am currently working on a script that pulls the ratings from Trakt but every time I update it it is replaced a little bit later. I checked the source code but I am unable to locate where exactly it is that it updates the rating to comment it out.
 

conguero23

Portal Member
December 9, 2012
48
10
44
Home Country
United States of America United States of America
Its not actually manually if I replace the tvdb rating with something else it overrides it when it updates. I am able to update all rating values from the tvdb one to the trakt one. once tvseries updates it automatically overwrites it. I am asking if there is anyway to stop it from re downloading the ratings from thetvdb. I looked into the source code for tv-series but was unable to locate the code where it downloads the ratings to comment it out.
 

barneh

MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Okay... There should be possible to "disable". I haven't the src in front of me know... But start in the db. Find the value there. Search for column name if rating in src, and you will find it... I hope.
    Otherwise I maybe can look at it tomorrow...
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    @ltfearme said TVSeries pulls trakt ratings if trakt rating dialog is enabled and pulls tvdb in other case as I remeber
     

    conguero23

    Portal Member
    December 9, 2012
    48
    10
    44
    Home Country
    United States of America United States of America
    I think it only pulls and syncs user ratings were we rated the episode not community ratings. @barneh thank you I tried all night yesterday and was unable to locate it. Thanks for your help.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Yes thats correct @conguero, the trakt plugin only updates user ratings from trakt.tv.

    The TVSeries plugin will update all fields unless filtered out, have a look in OnlineParse for UpdateSeries and you will notice some code:
    Code:
      // find the corresponding series in our list
      foreach (DBSeries localSeries in SeriesList) {
      if (localSeries[DBSeries.cID] == updatedSeries[DBSeries.cID]) {
      m_worker.ReportProgress(0, new ParsingProgress(ParsingAction.UpdateSeries, updatedSeries[DBOnlineSeries.cPrettyName], ++nIndex, SeriesList.Count, updatedSeries, null));
      // go over all the fields, (and update only those which haven't been modified by the user - will do that later)
      foreach (String key in updatedSeries.FieldNames) {
      switch (key) {
      // do not overwrite current series local settings with the one from the online series (baaaad design??)
      case DBSeries.cParsedName: // this field shouldn't be required here since updatedSeries is an Onlineseries and not a localseries??
      case DBOnlineSeries.cHasLocalFiles:
      case DBOnlineSeries.cHasLocalFilesTemp:
      case DBOnlineSeries.cEpisodesUnWatched:
      case DBOnlineSeries.cEpisodeCount:
      case DBOnlineSeries.cIsFavourite:
      case DBOnlineSeries.cChosenEpisodeOrder:
      case DBOnlineSeries.cEpisodeSortOrder:
      case DBOnlineSeries.cBannerFileNames: // banners get handled differently (later on)
      case DBOnlineSeries.cPosterFileNames:
      case DBOnlineSeries.cCurrentBannerFileName:
      case DBOnlineSeries.cCurrentPosterFileName:
      case DBOnlineSeries.cMyRating:
      case DBOnlineSeries.cViewTags:
      case DBOnlineSeries.cHasNewEpisodes: //gets cleared and updated at end of scan
      case DBOnlineSeries.cTraktIgnore:
      case DBOnlineSeries.cOriginalName:
      break;
      case DBOnlineSeries.cEpisodeOrders:
      if (bUpdateNewSeries)
      goto default;
      break;
      default:
      if (!key.EndsWith(DBTable.cUserEditPostFix))
      {
      localSeries.AddColumn(key, new DBField(DBField.cTypeString));
      localSeries[key] = updatedSeries[key].ToString().RemapHighOrderChars();
      }
      break;
      }
      }
    
      // diff. order options
      if (bUpdateNewSeries)
      SetEpisodeOrderForSeries(localSeries);
    
      // data import completed; set to 2 (data up to date)
      localSeries[DBOnlineSeries.cOnlineDataImported] = 2;
    
      if (localSeries[DBOnlineSeries.cHasLocalFilesTemp])
      localSeries[DBOnlineSeries.cHasLocalFiles] = 1;
       
      localSeries.Commit();
       
      // UPDATE CACHE to fix getting the series named as the parsed name instead of the online pretty name!
      if(bUpdateNewSeries) cache.addChangeSeries(localSeries);
      }
      }
      }

    The switch explicitly filters out the fields that should not be updated or set's it in the default. So if you dont want something set you need to add the field in there. There is something similar for Episodes.

    I think there might be more than one place this is done, you can search for one of the fields e.g. cMyRating and see what turns up.
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Sorry I'm still not sure what you want to do? Do you want to NOT update with the tvdb rating but with the trakt rating?
     

    conguero23

    Portal Member
    December 9, 2012
    48
    10
    44
    Home Country
    United States of America United States of America
    @barneh Yes I don't want to utilize thetvdb.com rating I want to use a trakt.com rating that will be supplied by a script that i am working on so i want to basically disable the rating and ratingCount fields from updating. Trakt only syncs with the myrating field.

    @ltfearme Thank You for the info I will work on it little while. BTW have you ever thought about using Trakt rating instead on tvdb since the tvdb hardly gets rated for the shows?
     

    Users who are viewing this thread

    Top Bottom