Permalink
Browse files

videodb: do not retrieve streamdetails for set items - the actual str…

…eamdetails will be queried for the single items later on
  • Loading branch information...
1 parent 60ba8b1 commit 30e9f4580dba814807fa31c1fbdfa4d2c6bc7777 @mkortstiege mkortstiege committed with Jun 17, 2012
Showing with 8 additions and 7 deletions.
  1. +6 −5 xbmc/video/VideoDatabase.cpp
  2. +2 −2 xbmc/video/VideoDatabase.h
@@ -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();
}
@@ -739,8 +739,8 @@ class CVideoDatabase : public CDatabase
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);

0 comments on commit 30e9f45

Please sign in to comment.