diff options
author | montellese <montellese@xbmc.org> | 2013-07-15 13:08:52 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2013-07-15 13:08:52 +0200 |
commit | 80bb9b93db6a70762b7c05ed6b1e98451c9606bc (patch) | |
tree | ab97dc2c1601263d565baf1b557cd8bb6937d6d2 | |
parent | 52e2c692d2e6d37d811e944519db3607bb1092ca (diff) |
jsonrpc: fix bad if condition in CFooLibrary::FillFileItem
-rw-r--r-- | xbmc/interfaces/json-rpc/AudioLibrary.cpp | 6 | ||||
-rw-r--r-- | xbmc/interfaces/json-rpc/VideoLibrary.cpp | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/xbmc/interfaces/json-rpc/AudioLibrary.cpp b/xbmc/interfaces/json-rpc/AudioLibrary.cpp index 4b83b2f919..64986fe96f 100644 --- a/xbmc/interfaces/json-rpc/AudioLibrary.cpp +++ b/xbmc/interfaces/json-rpc/AudioLibrary.cpp @@ -587,9 +587,11 @@ bool CAudioLibrary::FillFileItem(const CStdString &strFilename, CFileItemPtr &it } if (item->GetLabel().empty()) + { item->SetLabel(CUtil::GetTitleFromPath(strFilename, false)); - if (item->GetLabel()) - item->SetLabel(URIUtils::GetFileName(strFilename)); + if (item->GetLabel().empty()) + item->SetLabel(URIUtils::GetFileName(strFilename)); + } return true; } diff --git a/xbmc/interfaces/json-rpc/VideoLibrary.cpp b/xbmc/interfaces/json-rpc/VideoLibrary.cpp index e6b7bc444d..8b688b7248 100644 --- a/xbmc/interfaces/json-rpc/VideoLibrary.cpp +++ b/xbmc/interfaces/json-rpc/VideoLibrary.cpp @@ -700,9 +700,11 @@ bool CVideoLibrary::FillFileItem(const CStdString &strFilename, CFileItemPtr &it item->SetFromVideoInfoTag(details); if (item->GetLabel().empty()) + { item->SetLabel(CUtil::GetTitleFromPath(strFilename, false)); - if (item->GetLabel()) - item->SetLabel(URIUtils::GetFileName(strFilename)); + if (item->GetLabel().empty()) + item->SetLabel(URIUtils::GetFileName(strFilename)); + } return true; } |