Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
reverted: r27237 - changed: Use directory cache for getting video/mus…
Browse files Browse the repository at this point in the history
…ic folder thumbs. It actually seems to slow things down

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@27265 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
arnova committed Jan 29, 2010
1 parent 627fc4b commit aa03045
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions xbmc/FileItem.cpp
Expand Up @@ -2432,17 +2432,14 @@ CStdString CFileItem::GetUserMusicThumb(bool alwaysCheckRemote /* = false */) co
// if a folder, check for folder.jpg
if (m_bIsFolder && !IsFileFolder() && (!IsRemote() || alwaysCheckRemote || g_guiSettings.GetBool("musicfiles.findremotethumbs")))
{
CFileItemList items;
CDirectory::GetDirectory(m_strPath, items, g_settings.m_pictureExtensions, false, false, DIR_CACHE_ALWAYS, false);
CStdStringArray thumbs;
StringUtils::SplitString(g_advancedSettings.m_musicThumbs, "|", thumbs);

for (unsigned int i = 0; i < thumbs.size(); ++i)
{
for (int j = 0; j < items.Size(); j++)
CStdString folderThumb(GetFolderThumb(thumbs[i]));
if (CFile::Exists(folderThumb))
{
if (items[j]->m_strPath.CompareNoCase(GetFolderThumb(thumbs[i])) == 0)
return items[j]->m_strPath;
return folderThumb;
}
}
}
Expand Down Expand Up @@ -2598,17 +2595,14 @@ CStdString CFileItem::GetUserVideoThumb() const
// 3. check folder image in_m_dvdThumbs (folder.jpg)
if (m_bIsFolder && !IsFileFolder())
{
CFileItemList items;
CDirectory::GetDirectory(m_strPath, items, g_settings.m_pictureExtensions, false, false, DIR_CACHE_ALWAYS, false);
CStdStringArray thumbs;
StringUtils::SplitString(g_advancedSettings.m_dvdThumbs, "|", thumbs);

for (unsigned int i = 0; i < thumbs.size(); ++i)
{
for (int j = 0; j < items.Size(); j++)
CStdString folderThumb(GetFolderThumb(thumbs[i]));
if (CFile::Exists(folderThumb))
{
if (items[j]->m_strPath.CompareNoCase(GetFolderThumb(thumbs[i])) == 0)
return items[j]->m_strPath;
return folderThumb;
}
}
}
Expand Down

0 comments on commit aa03045

Please sign in to comment.