diff options
author | DaveTBlake <oak99sky@yahoo.co.uk> | 2018-02-25 18:48:12 +0000 |
---|---|---|
committer | DaveTBlake <oak99sky@yahoo.co.uk> | 2018-02-25 18:48:12 +0000 |
commit | a2d469e11cae217f23b419f195891c706e4dacfe (patch) | |
tree | d37c120a0e79c161ff70fa481a72c59ffa12b592 | |
parent | b608be0e42c2ad0900e8b70033219ea2d2b70bcd (diff) |
When MusicInfoTags are available comparing the DBId and the Type is
a both more accurate and quicker test that two items are the same path.
-rw-r--r-- | xbmc/FileItem.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp index 39b94928c6..925d5607f3 100644 --- a/xbmc/FileItem.cpp +++ b/xbmc/FileItem.cpp @@ -1506,6 +1506,12 @@ bool CFileItem::IsSamePath(const CFileItem *item) const return (item->GetProperty("item_start") == GetProperty("item_start")); return true; } + if (HasMusicInfoTag() && item->HasMusicInfoTag()) + { + if (GetMusicInfoTag()->GetDatabaseId() != -1 && item->GetMusicInfoTag()->GetDatabaseId() != -1) + return ((GetMusicInfoTag()->GetDatabaseId() == item->GetMusicInfoTag()->GetDatabaseId()) && + (GetMusicInfoTag()->GetType() == item->GetMusicInfoTag()->GetType())); + } if (HasVideoInfoTag() && item->HasVideoInfoTag()) { if (GetVideoInfoTag()->m_iDbId != -1 && item->GetVideoInfoTag()->m_iDbId != -1) |