Music: do not sync obsolete artwork

This commit is contained in:
croneter 2020-12-20 16:25:47 +01:00
parent 4b9fda9e81
commit 4da58d72dd
2 changed files with 8 additions and 41 deletions

View file

@ -172,16 +172,6 @@ class Artist(MusicMixin, ItemBase):
if app.SYNC.artwork:
artworks = api.artwork()
if 'poster' in artworks:
thumb = "<thumb>%s</thumb>" % artworks['poster']
else:
thumb = None
if 'fanart' in artworks:
fanart = "<fanart>%s</fanart>" % artworks['fanart']
else:
fanart = None
else:
thumb, fanart = None, None
# UPDATE THE ARTIST #####
if update_item:
@ -196,7 +186,6 @@ class Artist(MusicMixin, ItemBase):
kodi_id = self.kodidb.add_artist(api.title(), musicBrainzId)
self.kodidb.update_artist(api.list_to_string(api.genres()),
api.plot(),
thumb,
timing.unix_date_to_kodi(self.last_sync),
kodi_id)
if app.SYNC.artwork:
@ -276,12 +265,6 @@ class Album(MusicMixin, ItemBase):
genre = api.list_to_string(api.genres())
if app.SYNC.artwork:
artworks = api.artwork()
if 'poster' in artworks:
thumb = "<thumb>%s</thumb>" % artworks['poster']
else:
thumb = None
else:
thumb = None
# UPDATE THE ALBUM #####
if update_item:
@ -296,7 +279,6 @@ class Album(MusicMixin, ItemBase):
api.premiere_date(),
compilation,
api.plot(),
thumb,
api.list_to_string(api.studios()),
api.userrating(),
timing.unix_date_to_kodi(self.last_sync),
@ -317,7 +299,6 @@ class Album(MusicMixin, ItemBase):
api.premiere_date(),
compilation,
api.plot(),
thumb,
api.list_to_string(api.studios()),
api.userrating(),
timing.unix_date_to_kodi(self.last_sync),

View file

@ -196,12 +196,11 @@ class KodiMusicDB(common.KodiDBBase):
strOrigReleaseDate,
bCompilation,
strReview,
strImage,
strLabel,
iUserrating,
lastScraped,
strReleaseType)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
''', (args))
else:
args = list(args)
@ -237,7 +236,6 @@ class KodiMusicDB(common.KodiDBBase):
strOrigReleaseDate = ?,
bCompilation = ?,
strReview = ?,
strImage = ?,
strLabel = ?,
iUserrating = ?,
lastScraped = ?,
@ -425,18 +423,6 @@ class KodiMusicDB(common.KodiDBBase):
@db.catch_operationalerrors
def update_artist(self, *args):
if app.SYNC.artwork:
self.cursor.execute('''
UPDATE artist
SET strGenres = ?,
strBiography = ?,
strImage = ?,
lastScraped = ?
WHERE idArtist = ?
''', (args))
else:
args = list(args)
del args[3], args[2]
self.cursor.execute('''
UPDATE artist
SET strGenres = ?,