diff --git a/resources/lib/itemtypes/music.py b/resources/lib/itemtypes/music.py index 58e4b042..ece044a1 100644 --- a/resources/lib/itemtypes/music.py +++ b/resources/lib/itemtypes/music.py @@ -550,6 +550,7 @@ class Song(MusicMixin, ItemBase): userdata['UserRating'], comment, mood, + api.date_created(), kodi_id) else: self.kodidb.update_song_17(parent_id, @@ -565,6 +566,7 @@ class Song(MusicMixin, ItemBase): userdata['UserRating'], comment, mood, + api.date_created(), kodi_id) # OR ADD THE SONG ##### else: @@ -590,7 +592,8 @@ class Song(MusicMixin, ItemBase): userdata['UserRating'], 0, 0, - mood) + mood, + api.date_created()) else: self.kodidb.add_song_17(kodi_id, parent_id, @@ -608,7 +611,8 @@ class Song(MusicMixin, ItemBase): userdata['UserRating'], 0, 0, - mood) + mood, + api.date_created()) if v.KODIVERSION < 18: # Link song to album self.kodidb.add_albuminfosong(kodi_id, diff --git a/resources/lib/kodi_db/music.py b/resources/lib/kodi_db/music.py index b965bafa..4c843f82 100644 --- a/resources/lib/kodi_db/music.py +++ b/resources/lib/kodi_db/music.py @@ -316,8 +316,9 @@ class KodiMusicDB(common.KodiDBBase): rating, iStartOffset, iEndOffset, - mood) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + mood, + dateAdded) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''', (args)) def add_song_17(self, *args): @@ -339,8 +340,9 @@ class KodiMusicDB(common.KodiDBBase): rating, iStartOffset, iEndOffset, - mood) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + mood, + dateAdded) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''', (args)) def update_song(self, *args): @@ -358,7 +360,8 @@ class KodiMusicDB(common.KodiDBBase): lastplayed = ?, rating = ?, comment = ?, - mood = ? + mood = ?, + dateAdded = ? WHERE idSong = ? ''', (args)) @@ -377,7 +380,8 @@ class KodiMusicDB(common.KodiDBBase): lastplayed = ?, rating = ?, comment = ?, - mood = ? + mood = ?, + dateAdded = ? WHERE idSong = ? ''', (args))