Skip to content

Instantly share code, notes, and snippets.

@pieh
Created May 16, 2012 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pieh/c99dfbbc15df4e7456b9 to your computer and use it in GitHub Desktop.
Save pieh/c99dfbbc15df4e7456b9 to your computer and use it in GitHub Desktop.
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp
index 3ee1ea4..7771012 100644
--- a/xbmc/FileItem.cpp
+++ b/xbmc/FileItem.cpp
@@ -1119,29 +1119,34 @@ bool CFileItem::IsSamePath(const CFileItem *item) const
if (!item)
return false;
- if (item->GetPath() == m_strPath && item->m_lStartOffset == m_lStartOffset) return true;
+ if (item->GetPath() == m_strPath)
+ {
+ if (item->HasProperty("match_part") || HasProperty("match_part"))
+ return (item->GetProperty("match_part") == GetProperty("match_part"));
+ return true;
+ }
if (IsMusicDb() && HasMusicInfoTag())
{
CFileItem dbItem(m_musicInfoTag->GetURL(), false);
- dbItem.m_lStartOffset = m_lStartOffset;
+ dbItem.SetProperty("match_part", GetProperty("match_part"));
return dbItem.IsSamePath(item);
}
if (IsVideoDb() && HasVideoInfoTag())
{
CFileItem dbItem(m_videoInfoTag->m_strFileNameAndPath, false);
- dbItem.m_lStartOffset = m_lStartOffset;
+ dbItem.SetProperty("match_part", GetProperty("match_part"));
return dbItem.IsSamePath(item);
}
if (item->IsMusicDb() && item->HasMusicInfoTag())
{
CFileItem dbItem(item->m_musicInfoTag->GetURL(), false);
- dbItem.m_lStartOffset = item->m_lStartOffset;
+ dbItem.SetProperty("match_part", item->GetProperty("match_part"));
return IsSamePath(&dbItem);
}
if (item->IsVideoDb() && item->HasVideoInfoTag())
{
CFileItem dbItem(item->m_videoInfoTag->m_strFileNameAndPath, false);
- dbItem.m_lStartOffset = item->m_lStartOffset;
+ dbItem.SetProperty("match_part", item->GetProperty("match_part"));
return IsSamePath(&dbItem);
}
if (HasProperty("original_listitem_url"))
@@ -1970,6 +1975,7 @@ void CFileItemList::FilterCueItems()
{
// now create the file item, and add to the item list.
CFileItemPtr pItem(new CFileItem(itemstoadd[i]));
+ pItem->SetProperty("match_part", pItem->m_lStartOffset);
m_items.push_back(pItem);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment