mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Fix music compare
For album artists, add a checksum verification. To review at a later time
This commit is contained in:
parent
2b0c9d1bbc
commit
40f43b39fd
1 changed files with 7 additions and 1 deletions
|
@ -75,8 +75,10 @@ class Music(common.Items):
|
||||||
views = self.emby_db.getView_byType('music')
|
views = self.emby_db.getView_byType('music')
|
||||||
try:
|
try:
|
||||||
all_kodiartists = dict(self.emby_db.get_checksum('MusicArtist'))
|
all_kodiartists = dict(self.emby_db.get_checksum('MusicArtist'))
|
||||||
|
all_kodialbumartists = dict(self.emby_db.get_checksum('AlbumArtist'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
all_kodiartists = {}
|
all_kodiartists = {}
|
||||||
|
all_kodialbumartists = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
all_kodialbums = dict(self.emby_db.get_checksum('MusicAlbum'))
|
all_kodialbums = dict(self.emby_db.get_checksum('MusicAlbum'))
|
||||||
|
@ -117,7 +119,11 @@ class Music(common.Items):
|
||||||
itemid = embyitem['Id']
|
itemid = embyitem['Id']
|
||||||
if data_type == "artists":
|
if data_type == "artists":
|
||||||
all_embyartistsIds.add(itemid)
|
all_embyartistsIds.add(itemid)
|
||||||
if all_kodiartists.get(itemid) != API.get_checksum():
|
if itemid in all_kodiartists:
|
||||||
|
if all_kodiartists[itemid] != API.get_checksum():
|
||||||
|
# Only update if artist is not in Kodi or checksum is different
|
||||||
|
updatelist.append(itemid)
|
||||||
|
elif all_kodialbumartists.get(itemid) != API.get_checksum():
|
||||||
# Only update if artist is not in Kodi or checksum is different
|
# Only update if artist is not in Kodi or checksum is different
|
||||||
updatelist.append(itemid)
|
updatelist.append(itemid)
|
||||||
elif data_type == "albums":
|
elif data_type == "albums":
|
||||||
|
|
Loading…
Reference in a new issue