Skip to content

Commit

Permalink
IsSamePath() failed on videodb and musicdb item matching to real path…
Browse files Browse the repository at this point in the history
…s as the item_start was transferred indiscriminantly, and CVariant('') != CVariant(NULL)
  • Loading branch information
Jonathan Marshall committed Dec 19, 2012
1 parent bf52afe commit b686293
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions xbmc/FileItem.cpp
Expand Up @@ -1412,25 +1412,29 @@ bool CFileItem::IsSamePath(const CFileItem *item) const
if (IsMusicDb() && HasMusicInfoTag())
{
CFileItem dbItem(m_musicInfoTag->GetURL(), false);
dbItem.SetProperty("item_start", GetProperty("item_start"));
if (HasProperty("item_start"))
dbItem.SetProperty("item_start", GetProperty("item_start"));
return dbItem.IsSamePath(item);
}
if (IsVideoDb() && HasVideoInfoTag())
{
CFileItem dbItem(m_videoInfoTag->m_strFileNameAndPath, false);
dbItem.SetProperty("item_start", GetProperty("item_start"));
if (HasProperty("item_start"))
dbItem.SetProperty("item_start", GetProperty("item_start"));
return dbItem.IsSamePath(item);
}
if (item->IsMusicDb() && item->HasMusicInfoTag())
{
CFileItem dbItem(item->m_musicInfoTag->GetURL(), false);
dbItem.SetProperty("item_start", item->GetProperty("item_start"));
if (item->HasProperty("item_start"))
dbItem.SetProperty("item_start", item->GetProperty("item_start"));
return IsSamePath(&dbItem);
}
if (item->IsVideoDb() && item->HasVideoInfoTag())
{
CFileItem dbItem(item->m_videoInfoTag->m_strFileNameAndPath, false);
dbItem.SetProperty("item_start", item->GetProperty("item_start"));
if (item->HasProperty("item_start"))
dbItem.SetProperty("item_start", item->GetProperty("item_start"));
return IsSamePath(&dbItem);
}
if (HasProperty("original_listitem_url"))
Expand Down

0 comments on commit b686293

Please sign in to comment.