aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Blake <oak99sky@yahoo.co.uk>2020-07-04 14:17:18 +0100
committerGitHub <noreply@github.com>2020-07-04 14:17:18 +0100
commit9206f9e6c4a2fd2acc46c598549413b919e1df7b (patch)
tree90398e9e1cade56581dd0ff9e89a3ff8a8fe5bf0
parent7d6f7f812c6593b0ed4113e52fe354f6b61b856f (diff)
parentd347245205c555fc0e277b6d4cc536e0d1a97bcf (diff)
Merge pull request #18132 from DaveTBlake/artistmbidfix
[Music]Fix check that another artist with this mbid not already exist
-rw-r--r--xbmc/music/MusicDatabase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp
index c6aa125d4b..3639722ee8 100644
--- a/xbmc/music/MusicDatabase.cpp
+++ b/xbmc/music/MusicDatabase.cpp
@@ -1787,7 +1787,7 @@ int CMusicDatabase::UpdateArtist(int idArtist,
bool isScrapedMBID = bScrapedMBID;
std::string artistname;
int idArtistMbid = GetArtistFromMBID(strMusicBrainzArtistID, artistname);
- if (idArtistMbid > 0)
+ if (idArtistMbid > 0 && idArtistMbid != idArtist)
{
CLog::Log(LOGDEBUG, "{0}: Updating {4} (Id: {5}) mbid {1} already assigned to {2} (Id: {3})",
__FUNCTION__, strMusicBrainzArtistID.c_str(), artistname.c_str(), idArtistMbid,
@@ -1836,10 +1836,10 @@ bool CMusicDatabase::UpdateArtistScrapedMBID(int idArtist, const std::string& st
if (strMusicBrainzArtistID.empty() || idArtist < 0)
return false;
- // Check artist with this mbid not already exist (an alias for example)
+ // Check another artist with this mbid not already exist (an alias for example)
std::string artistname;
int idArtistMbid = GetArtistFromMBID(strMusicBrainzArtistID, artistname);
- if (idArtistMbid > 0)
+ if (idArtistMbid > 0 && idArtistMbid != idArtist)
{
CLog::Log(LOGDEBUG, "{0}: Artist mbid {1} already assigned to {2} (Id: {3})", __FUNCTION__,
strMusicBrainzArtistID.c_str(), artistname.c_str(), idArtistMbid);