From 0363804c8e875b7e1efe568ba693420d34ae18f1 Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Thu, 21 Jan 2016 23:45:51 +0100 Subject: [PATCH] fix music sync when directstream enabled --- addon.xml | 2 +- resources/lib/itemtypes.py | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/addon.xml b/addon.xml index 8cd6d717..4948d7ab 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 51e76532..e2ad16c4 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1948,17 +1948,16 @@ class Music(Items): track = disc*2**16 + tracknumber year = item.get('ProductionYear') duration = API.getRuntime() - - #the server only returns the rating based on like/love and not the actual rating from the song - rating = userdata['UserRating'] - - #the server doesn't support comment on songs so this will always be empty - comment = API.getOverview() - + #if enabled, try to get the rating from file and/or emby if not self.directstream: rating, comment, hasEmbeddedCover = musicutils.getAdditionalSongTags(itemid, rating, API, kodicursor, emby_db, self.enableimportsongrating, self.enableexportsongrating, self.enableupdatesongrating) - + else: + hasEmbeddedCover = False + comment = API.getOverview() + rating = userdata['UserRating'] + + ##### GET THE FILE AND PATH ##### if self.directstream: path = "%s/emby/Audio/%s/" % (self.server, itemid)