Skip to content

Commit

Permalink
[gui] - only set listitem.dbid for dbid > -1
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Apr 15, 2016
1 parent 5e51122 commit 56a67cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10090,11 +10090,15 @@ std::string CGUIInfoManager::GetItemLabel(const CFileItem *item, int info, std::
case LISTITEM_DBID:
if (item->HasVideoInfoTag())
{
return StringUtils::Format("%i", item->GetVideoInfoTag()->m_iDbId);
int dbId = item->GetVideoInfoTag()->m_iDbId;
if (dbId > -1)
return StringUtils::Format("%i", dbId);
}
if (item->HasMusicInfoTag())
{
return StringUtils::Format("%i", item->GetMusicInfoTag()->GetDatabaseId());
int dbId = item->GetMusicInfoTag()->GetDatabaseId();
if (dbId > -1)
return StringUtils::Format("%i", dbId);
}
break;
case LISTITEM_STEREOSCOPIC_MODE:
Expand Down

0 comments on commit 56a67cb

Please sign in to comment.