json-rpc: don't try to set playcount/lastplayed for tvshows
authormontellese <montellese@xbmc.org>
Wed, 12 Mar 2014 08:00:38 +0000 (09:00 +0100)
committermontellese <montellese@xbmc.org>
Thu, 13 Mar 2014 06:55:44 +0000 (07:55 +0100)
xbmc/interfaces/json-rpc/VideoLibrary.cpp

index fdb1633..fe5bca2 100644 (file)
@@ -568,9 +568,6 @@ JSONRPC_STATUS CVideoLibrary::SetTVShowDetails(const CStdString &method, ITransp
   std::map<int, std::map<std::string, std::string> > seasonArt;
   videodatabase.GetTvShowSeasonArt(infos.m_iDbId, seasonArt);
 
-  int playcount = infos.m_playCount;
-  CDateTime lastPlayed = infos.m_lastPlayed;
-
   std::set<std::string> removedArtwork;
   UpdateVideoTag(parameterObject, infos, artwork, removedArtwork);
 
@@ -584,14 +581,6 @@ JSONRPC_STATUS CVideoLibrary::SetTVShowDetails(const CStdString &method, ITransp
   if (!videodatabase.RemoveArtForItem(infos.m_iDbId, "tvshow", removedArtwork))
     return InternalError;
 
-  if (playcount != infos.m_playCount || lastPlayed != infos.m_lastPlayed)
-  {
-    // restore original playcount or the new one won't be announced
-    int newPlaycount = infos.m_playCount;
-    infos.m_playCount = playcount;
-    videodatabase.SetPlayCount(CFileItem(infos), newPlaycount, infos.m_lastPlayed.IsValid() ? infos.m_lastPlayed : CDateTime::GetCurrentDateTime());
-  }
-
   CJSONRPCUtils::NotifyItemUpdated();
   return ACK;
 }