From 56ef72183673f4afe8171f99a0ccf71136c8b865 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 22 Oct 2015 17:49:38 -0500 Subject: [PATCH] Fix artwork for albums Boxrear is poster, primary is thumb instead of primary being thumb and poster and boxrear is poster. --- resources/lib/WriteKodiMusicDB.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/lib/WriteKodiMusicDB.py b/resources/lib/WriteKodiMusicDB.py index 2d98b34f..e83e895a 100644 --- a/resources/lib/WriteKodiMusicDB.py +++ b/resources/lib/WriteKodiMusicDB.py @@ -221,8 +221,16 @@ class WriteKodiMusicDB(): self.AddGenresToMedia(albumid, genres, "album", cursor) # Update artwork - self.textureCache.addArtwork(artworks, albumid, "album", cursor) + if artworks['Primary']: + self.textureCache.addOrUpdateArt(artworks['Primary'], albumid, "album", "thumb", cursor) + artworks['Primary'] = "" + + if artworks.get('BoxRear'): + self.textureCache.addOrUpdateArt(artworks['BoxRear'], albumid, "album", "poster", cursor) + artworks['BoxRear'] = "" + self.textureCache.addArtwork(artworks, albumid, "album", cursor) + # Link album to artists if MBartists: album_artists = MBitem['AlbumArtists']