Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

jsonrpc: fix bad if condition in CFooLibrary::FillFileItem

  • Loading branch information...
commit 80bb9b93db6a70762b7c05ed6b1e98451c9606bc 1 parent 52e2c69
Sascha Montellese Montellese authored
6 xbmc/interfaces/json-rpc/AudioLibrary.cpp
View
@@ -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;
}
6 xbmc/interfaces/json-rpc/VideoLibrary.cpp
View
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.