Skip to content

Commit

Permalink
jsonrpc: fix bad if condition in CFooLibrary::FillFileItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Jul 15, 2013
1 parent 52e2c69 commit 80bb9b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions xbmc/interfaces/json-rpc/AudioLibrary.cpp
Expand Up @@ -587,9 +587,11 @@ bool CAudioLibrary::FillFileItem(const CStdString &strFilename, CFileItemPtr &it
} }


if (item->GetLabel().empty()) if (item->GetLabel().empty())
{
item->SetLabel(CUtil::GetTitleFromPath(strFilename, false)); item->SetLabel(CUtil::GetTitleFromPath(strFilename, false));
if (item->GetLabel()) if (item->GetLabel().empty())
item->SetLabel(URIUtils::GetFileName(strFilename)); item->SetLabel(URIUtils::GetFileName(strFilename));
}


return true; return true;
} }
Expand Down
6 changes: 4 additions & 2 deletions xbmc/interfaces/json-rpc/VideoLibrary.cpp
Expand Up @@ -700,9 +700,11 @@ bool CVideoLibrary::FillFileItem(const CStdString &strFilename, CFileItemPtr &it


item->SetFromVideoInfoTag(details); item->SetFromVideoInfoTag(details);
if (item->GetLabel().empty()) if (item->GetLabel().empty())
{
item->SetLabel(CUtil::GetTitleFromPath(strFilename, false)); item->SetLabel(CUtil::GetTitleFromPath(strFilename, false));
if (item->GetLabel()) if (item->GetLabel().empty())
item->SetLabel(URIUtils::GetFileName(strFilename)); item->SetLabel(URIUtils::GetFileName(strFilename));
}
return true; return true;
} }


Expand Down

0 comments on commit 80bb9b9

Please sign in to comment.