diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2015-11-01 00:32:32 +0100 |
---|---|---|
committer | Martijn Kaijser <martijn@xbmc.org> | 2015-11-01 00:32:32 +0100 |
commit | e5f51772ecbfa9de3b6e27cd6b3c4de6cf030412 (patch) | |
tree | ec231035f9bfbde4c83fc6450207edeb85020d2e | |
parent | 8f3b451d3e2051c053c4fab3f0b0e993137c1701 (diff) | |
parent | b62c719e4002649e436049f55c591d264b536827 (diff) |
Merge pull request #8304 from koying/fix0b
FIX: don't show size for non-file items
-rw-r--r-- | xbmc/filesystem/AndroidAppDirectory.cpp | 1 | ||||
-rw-r--r-- | xbmc/filesystem/MusicDatabaseDirectory.cpp | 2 | ||||
-rw-r--r-- | xbmc/filesystem/VideoDatabaseDirectory.cpp | 1 | ||||
-rw-r--r-- | xbmc/utils/LabelFormatter.cpp | 2 |
4 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/filesystem/AndroidAppDirectory.cpp b/xbmc/filesystem/AndroidAppDirectory.cpp index 3317eb7c0e..69732bda57 100644 --- a/xbmc/filesystem/AndroidAppDirectory.cpp +++ b/xbmc/filesystem/AndroidAppDirectory.cpp @@ -69,6 +69,7 @@ bool CAndroidAppDirectory::GetDirectory(const CURL& url, CFileItemList &items) pItem->SetPath(path); pItem->SetLabel((*i).packageLabel); pItem->SetArt("thumb", path+".png"); + pItem->m_dwSize = -1; // No size items.Add(pItem); } return true; diff --git a/xbmc/filesystem/MusicDatabaseDirectory.cpp b/xbmc/filesystem/MusicDatabaseDirectory.cpp index 4413e7a316..4eafeaabcf 100644 --- a/xbmc/filesystem/MusicDatabaseDirectory.cpp +++ b/xbmc/filesystem/MusicDatabaseDirectory.cpp @@ -45,6 +45,8 @@ bool CMusicDatabaseDirectory::GetDirectory(const CURL& url, CFileItemList &items { std::string path = CLegacyPathTranslation::TranslateMusicDbPath(url); items.SetPath(path); + items.m_dwSize = -1; // No size + std::unique_ptr<CDirectoryNode> pNode(CDirectoryNode::ParseURL(path)); if (!pNode.get()) diff --git a/xbmc/filesystem/VideoDatabaseDirectory.cpp b/xbmc/filesystem/VideoDatabaseDirectory.cpp index ede4b24f74..96716fa7cb 100644 --- a/xbmc/filesystem/VideoDatabaseDirectory.cpp +++ b/xbmc/filesystem/VideoDatabaseDirectory.cpp @@ -46,6 +46,7 @@ bool CVideoDatabaseDirectory::GetDirectory(const CURL& url, CFileItemList &items { std::string path = CLegacyPathTranslation::TranslateVideoDbPath(url); items.SetPath(path); + items.m_dwSize = -1; // No size std::unique_ptr<CDirectoryNode> pNode(CDirectoryNode::ParseURL(path)); if (!pNode.get()) diff --git a/xbmc/utils/LabelFormatter.cpp b/xbmc/utils/LabelFormatter.cpp index 2ec0e91a83..7b0b4e5109 100644 --- a/xbmc/utils/LabelFormatter.cpp +++ b/xbmc/utils/LabelFormatter.cpp @@ -238,7 +238,7 @@ std::string CLabelFormatter::GetMaskContent(const CMaskString &mask, const CFile } break; case 'I': // size - if( !item->m_bIsFolder || item->m_dwSize != 0 ) + if( (item->m_bIsFolder && item->m_dwSize != 0) || item->m_dwSize >= 0 ) value = StringUtils::SizeToString(item->m_dwSize); break; case 'J': // date |