Permalink
Browse files

changed: move cached fanart resolving to the appthread. Resolves slow…

… cached fanart loading in very long directories at the expense of slightly slower dir retrieval. Ticket #9819.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33253 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
jmarshallnz
jmarshallnz committed Aug 28, 2010
1 parent 34249e9 commit 00e5de532008b3219a0df509a3640eea1e42f248
Showing with 14 additions and 0 deletions.
  1. +14 −0 xbmc/GUIWindowVideoBase.cpp
@@ -1679,6 +1679,20 @@ void CGUIWindowVideoBase::OnPrepareFileItems(CFileItemList &items)
{
if (!items.m_strPath.Equals("plugin://video/"))
items.SetCachedVideoThumbs();
+
+ if (items.GetContent() != "episodes")
+ { // we don't set cached fanart for episodes, as this requires a db fetch per episode
+ for (int i = 0; i < items.Size(); ++i)
+ {
+ CFileItemPtr item = items[i];
+ if (!item->HasProperty("fanart_image"))
+ {
+ CStdString art = item->GetCachedFanart();
+ if (CFile::Exists(art))
+ item->SetProperty("fanart_image", art);
+ }
+ }
+ }
}
void CGUIWindowVideoBase::AddToDatabase(int iItem)

0 comments on commit 00e5de5

Please sign in to comment.