videodb: do not retrieve streamdetails for set items - the actual streamdetails will...
authorvdrfan <vdrfan-nospam-@xbmc.org>
Sun, 17 Jun 2012 10:38:14 +0000 (12:38 +0200)
committermontellese <montellese@xbmc.org>
Sat, 7 Jul 2012 07:36:23 +0000 (09:36 +0200)
xbmc/video/VideoDatabase.cpp
xbmc/video/VideoDatabase.h

index 1e3187b..af8e81d 100644 (file)
@@ -3018,12 +3018,12 @@ bool CVideoDatabase::GetResumePoint(CVideoInfoTag& tag)
   return match;
 }
 
-CVideoInfoTag CVideoDatabase::GetDetailsForMovie(auto_ptr<Dataset> &pDS, bool needsCast /* = false */)
+CVideoInfoTag CVideoDatabase::GetDetailsForMovie(auto_ptr<Dataset> &pDS, bool needsCast /* = false */,  bool needsStreamDetails /* = true */)
 {
-  return GetDetailsForMovie(pDS->get_sql_record(), needsCast);
+  return GetDetailsForMovie(pDS->get_sql_record(), needsCast, needsStreamDetails);
 }
 
-CVideoInfoTag CVideoDatabase::GetDetailsForMovie(const dbiplus::sql_record* const record, bool needsCast /* = false */)
+CVideoInfoTag CVideoDatabase::GetDetailsForMovie(const dbiplus::sql_record* const record, bool needsCast /* = false */, bool needsStreamDetails /* = true */)
 {
   CVideoInfoTag details;
 
@@ -3040,7 +3040,8 @@ CVideoInfoTag CVideoDatabase::GetDetailsForMovie(const dbiplus::sql_record* cons
   GetCommonDetails(record, details);
   movieTime += XbmcThreads::SystemClockMillis() - time; time = XbmcThreads::SystemClockMillis();
 
-  GetStreamDetails(details);
+  if (needsStreamDetails)
+    GetStreamDetails(details);
 
   if (needsCast)
   {
@@ -4424,7 +4425,7 @@ bool CVideoDatabase::GetSetsByWhere(const CStdString& strBaseDir, const Filter &
       }
 
       // add the movie's details to the set
-      it->second.movies.push_back(GetDetailsForMovie(m_pDS));
+      it->second.movies.push_back(GetDetailsForMovie(m_pDS, false, false));
 
       m_pDS->next();
     }
index e163432..575df2f 100644 (file)
@@ -739,8 +739,8 @@ protected:
 
   void DeleteStreamDetails(int idFile);
   CVideoInfoTag GetDetailsByTypeAndId(VIDEODB_CONTENT_TYPE type, int id);
-  CVideoInfoTag GetDetailsForMovie(std::auto_ptr<dbiplus::Dataset> &pDS, bool needsCast = false);
-  CVideoInfoTag GetDetailsForMovie(const dbiplus::sql_record* const record, bool needsCast = false);
+  CVideoInfoTag GetDetailsForMovie(std::auto_ptr<dbiplus::Dataset> &pDS, bool needsCast = false, bool needsStreamDetails = true);
+  CVideoInfoTag GetDetailsForMovie(const dbiplus::sql_record* const record, bool needsCast = false, bool needsStreamDetails = true);
   CVideoInfoTag GetDetailsForTvShow(std::auto_ptr<dbiplus::Dataset> &pDS, bool needsCast = false);
   CVideoInfoTag GetDetailsForTvShow(const dbiplus::sql_record* const record, bool needsCast = false);
   CVideoInfoTag GetDetailsForEpisode(std::auto_ptr<dbiplus::Dataset> &pDS, bool needsCast = false);