Skip to content

Commit

Permalink
FIX: don't show size for non-file items
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Oct 29, 2015
1 parent ec8f051 commit b62c719
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions xbmc/filesystem/AndroidAppDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions xbmc/filesystem/MusicDatabaseDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
1 change: 1 addition & 0 deletions xbmc/filesystem/VideoDatabaseDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion xbmc/utils/LabelFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b62c719

Please sign in to comment.