From f4923eda2263c4888e4f566e708d5bf3a64e1d6f Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 20 Dec 2020 16:42:05 +0100 Subject: [PATCH] Music: sync kodi_type for albums additionally --- resources/lib/itemtypes/music.py | 7 +++++-- resources/lib/kodi_db/music.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/lib/itemtypes/music.py b/resources/lib/itemtypes/music.py index 7ca99401..c3f0c53a 100644 --- a/resources/lib/itemtypes/music.py +++ b/resources/lib/itemtypes/music.py @@ -280,9 +280,10 @@ class Album(MusicMixin, ItemBase): compilation, api.plot(), api.list_to_string(api.studios()), + api.kodi_type, api.userrating(), timing.unix_date_to_kodi(self.last_sync), - 'album', + api.kodi_type, kodi_id) # OR ADD THE ALBUM ##### else: @@ -300,9 +301,10 @@ class Album(MusicMixin, ItemBase): compilation, api.plot(), api.list_to_string(api.studios()), + api.kodi_type, api.userrating(), timing.unix_date_to_kodi(self.last_sync), - 'album') + api.kodi_type) self.kodidb.add_albumartist(artist_id, kodi_id, api.artist_name()) if app.SYNC.artwork: self.kodidb.modify_artwork(artworks, @@ -396,6 +398,7 @@ class Song(MusicMixin, ItemBase): None, None, None, + 'single', None, None, timing.unix_date_to_kodi(self.last_sync), diff --git a/resources/lib/kodi_db/music.py b/resources/lib/kodi_db/music.py index cd2d7c6e..34739b10 100644 --- a/resources/lib/kodi_db/music.py +++ b/resources/lib/kodi_db/music.py @@ -197,10 +197,11 @@ class KodiMusicDB(common.KodiDBBase): bCompilation, strReview, strLabel, + strType, iUserrating, lastScraped, strReleaseType) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''', (args)) else: args = list(args) @@ -217,10 +218,11 @@ class KodiMusicDB(common.KodiDBBase): bCompilation, strReview, strLabel, + strType, iUserrating, lastScraped, strReleaseType) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''', (args)) @db.catch_operationalerrors @@ -237,6 +239,7 @@ class KodiMusicDB(common.KodiDBBase): bCompilation = ?, strReview = ?, strLabel = ?, + strType = ?, iUserrating = ?, lastScraped = ?, strReleaseType = ?