diff options
-rw-r--r-- | xbmc/FileItem.cpp | 7 | ||||
-rw-r--r-- | xbmc/utils/URIUtils.cpp | 8 | ||||
-rw-r--r-- | xbmc/utils/URIUtils.h | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp index 49c7eec423..7c66e9e5d3 100644 --- a/xbmc/FileItem.cpp +++ b/xbmc/FileItem.cpp @@ -1114,6 +1114,13 @@ bool CFileItem::IsReadOnly() const void CFileItem::FillInDefaultIcon() { + if (URIUtils::IsPVRGuideItem(m_strPath)) + { + // epg items never have a default icon. no need to execute this expensive method. + // when filling epg grid window, easily tens of thousands of epg items are processed. + return; + } + //CLog::Log(LOGINFO, "FillInDefaultIcon(%s)", pItem->GetLabel().c_str()); // find the default icon for a file or folder item // for files this can be the (depending on the file type) diff --git a/xbmc/utils/URIUtils.cpp b/xbmc/utils/URIUtils.cpp index 4a9903c6b0..592dfedf35 100644 --- a/xbmc/utils/URIUtils.cpp +++ b/xbmc/utils/URIUtils.cpp @@ -908,6 +908,14 @@ bool URIUtils::IsPVRChannel(const std::string& strFile) return StringUtils::StartsWithNoCase(strFile2, "pvr://channels"); } +bool URIUtils::IsPVRGuideItem(const std::string& strFile) +{ + if (IsStack(strFile)) + return IsPVRGuideItem(CStackDirectory::GetFirstStackedFile(strFile)); + + return StringUtils::StartsWithNoCase(strFile, "pvr://guide"); +} + bool URIUtils::IsDAV(const std::string& strFile) { if (IsStack(strFile)) diff --git a/xbmc/utils/URIUtils.h b/xbmc/utils/URIUtils.h index 874d5ec81d..01323d76a9 100644 --- a/xbmc/utils/URIUtils.h +++ b/xbmc/utils/URIUtils.h @@ -163,6 +163,7 @@ public: static bool IsLibraryFolder(const std::string& strFile); static bool IsLibraryContent(const std::string& strFile); static bool IsPVRChannel(const std::string& strFile); + static bool IsPVRGuideItem(const std::string& strFile); static bool IsUsingFastSwitch(const std::string& strFile); static void AddSlashAtEnd(std::string& strFolder); |