aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvdrfan <vdrfan-nospam-@xbmc.org>2011-12-02 17:26:39 +0100
committervdrfan <vdrfan-nospam-@xbmc.org>2011-12-02 17:26:39 +0100
commit1bf90f76d69250623b0a8821f77c0f4f97f9d76f (patch)
tree95cfe8e8963bfdff2e112e8a750a6c19a3d93cbd
parentd660bcd7f0d85327e52a3097b1f5c60a2840b572 (diff)
fixed: removed redundant database query
-rw-r--r--xbmc/video/VideoDatabase.cpp1
-rw-r--r--xbmc/video/windows/GUIWindowVideoNav.cpp13
2 files changed, 7 insertions, 7 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 7ac7258530..adb6d4e3c4 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -2856,6 +2856,7 @@ CVideoInfoTag CVideoDatabase::GetDetailsForTvShow(auto_ptr<Dataset> &pDS, bool n
details.m_strPath = pDS->fv(VIDEODB_DETAILS_TVSHOW_PATH).get_asString();
details.m_iEpisode = m_pDS->fv(VIDEODB_DETAILS_TVSHOW_NUM_EPISODES).get_asInt();
details.m_playCount = m_pDS->fv(VIDEODB_DETAILS_TVSHOW_NUM_WATCHED).get_asInt();
+ details.m_strShowPath = details.m_strPath;
details.m_strShowTitle = details.m_strTitle;
movieTime += XbmcThreads::SystemClockMillis() - time; time = XbmcThreads::SystemClockMillis();
diff --git a/xbmc/video/windows/GUIWindowVideoNav.cpp b/xbmc/video/windows/GUIWindowVideoNav.cpp
index a22fe075d7..452377e1a5 100644
--- a/xbmc/video/windows/GUIWindowVideoNav.cpp
+++ b/xbmc/video/windows/GUIWindowVideoNav.cpp
@@ -302,14 +302,13 @@ bool CGUIWindowVideoNav::GetDirectory(const CStdString &strDirectory, CFileItemL
{
CLog::Log(LOGDEBUG, "WindowVideoNav::GetDirectory");
// grab the show thumb
- CStdString path;
- m_database.GetFilePathById(params.GetTvShowId(),path,VIDEODB_CONTENT_TVSHOWS);
- CFileItem showItem(path, true);
- showItem.SetVideoThumb();
- items.SetProperty("tvshowthumb", showItem.GetThumbnailImage());
- // Grab fanart data
CVideoInfoTag details;
- m_database.GetTvShowInfo(showItem.GetPath(), details, params.GetTvShowId());
+ m_database.GetTvShowInfo("", details, params.GetTvShowId());
+ CFileItem showItem(details.m_strShowPath, true);
+ if (showItem.GetCachedVideoThumb())
+ items.SetProperty("tvshowthumb", showItem.GetCachedVideoThumb());
+
+ // Grab fanart data
items.SetProperty("fanart_color1", details.m_fanart.GetColor(0));
items.SetProperty("fanart_color2", details.m_fanart.GetColor(1));
items.SetProperty("fanart_color3", details.m_fanart.GetColor(2));