From 4b9fda9e817517a7518f555474f4a5f1e9899aa2 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 20 Dec 2020 16:11:12 +0100 Subject: [PATCH] Music: replace songs's year with release date --- resources/lib/itemtypes/music.py | 10 ++++++++-- resources/lib/kodi_db/music.py | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/resources/lib/itemtypes/music.py b/resources/lib/itemtypes/music.py index 15a5a5c1..df45508e 100644 --- a/resources/lib/itemtypes/music.py +++ b/resources/lib/itemtypes/music.py @@ -485,7 +485,10 @@ class Song(MusicMixin, ItemBase): title, track, api.runtime(), - year, + api.premiere_date(), + # TODO: as soon as Plex supports the original + # release date (Kodi: strOrigReleaseDate) + api.premiere_date(), filename, api.viewcount(), api.lastplayed(), @@ -507,7 +510,10 @@ class Song(MusicMixin, ItemBase): title, track, api.runtime(), - year, + api.premiere_date(), + # TODO: as soon as Plex supports the original + # release date (Kodi: strOrigReleaseDate) + api.premiere_date(), filename, musicBrainzId, api.viewcount(), diff --git a/resources/lib/kodi_db/music.py b/resources/lib/kodi_db/music.py index 4d957c59..5024a3bc 100644 --- a/resources/lib/kodi_db/music.py +++ b/resources/lib/kodi_db/music.py @@ -337,7 +337,8 @@ class KodiMusicDB(common.KodiDBBase): strTitle, iTrack, iDuration, - iYear, + strReleaseDate, + strOrigReleaseDate, strFileName, strMusicBrainzTrackID, iTimesPlayed, @@ -347,7 +348,7 @@ class KodiMusicDB(common.KodiDBBase): iEndOffset, mood, dateAdded) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''', (args)) @db.catch_operationalerrors @@ -360,7 +361,8 @@ class KodiMusicDB(common.KodiDBBase): strTitle = ?, iTrack = ?, iDuration = ?, - iYear = ?, + strReleaseDate = ?, + strOrigReleaseDate = ?, strFilename = ?, iTimesPlayed = ?, lastplayed = ?,