From 8283204201ba71aeee12d02313de53b588096faa Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 25 Jan 2019 00:22:54 -0600 Subject: [PATCH 1/3] Fix header for requests Encode to utf-8 to prevent errors if the device name is non-ascii --- resources/lib/emby/core/http.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lib/emby/core/http.py b/resources/lib/emby/core/http.py index 904aefe5..a96c80c7 100644 --- a/resources/lib/emby/core/http.py +++ b/resources/lib/emby/core/http.py @@ -215,17 +215,17 @@ class HTTP(object): def _authorization(self, data): auth = "MediaBrowser " - auth += "Client=%s, " % self.config['app.name'] - auth += "Device=%s, " % self.config['app.device_name'] - auth += "DeviceId=%s, " % self.config['app.device_id'] - auth += "Version=%s" % self.config['app.version'] + auth += "Client=%s, " % self.config['app.name'].encode('utf-8') + auth += "Device=%s, " % self.config['app.device_name'].encode('utf-8') + auth += "DeviceId=%s, " % self.config['app.device_id'].encode('utf-8') + auth += "Version=%s" % self.config['app.version'].encode('utf-8') data['headers'].update({'Authorization': auth}) if self.config['auth.token']: - auth += ', UserId=%s' % self.config['auth.user_id'] - data['headers'].update({'Authorization': auth, 'X-MediaBrowser-Token': self.config['auth.token']}) + auth += ', UserId=%s' % self.config['auth.user_id'].encode('utf-8') + data['headers'].update({'Authorization': auth, 'X-MediaBrowser-Token': self.config['auth.token'].encode('utf-8')}) return data From 3363df431cc8449708dc9168531c58b3627f6484 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 25 Jan 2019 04:30:43 -0600 Subject: [PATCH 2/3] Update Krypton objects --- resources/lib/objects/__init__.py | 2 +- resources/lib/objects/kodi/queries.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lib/objects/__init__.py b/resources/lib/objects/__init__.py index 910a966a..55eb734d 100644 --- a/resources/lib/objects/__init__.py +++ b/resources/lib/objects/__init__.py @@ -1,4 +1,4 @@ -version = "171076028" +version = "171076029" from movies import Movies from musicvideos import MusicVideos diff --git a/resources/lib/objects/kodi/queries.py b/resources/lib/objects/kodi/queries.py index 759204b8..c823bf93 100644 --- a/resources/lib/objects/kodi/queries.py +++ b/resources/lib/objects/kodi/queries.py @@ -320,11 +320,11 @@ add_musicvideo = """ INSERT INTO musicvideo(idMVideo,idFile, c00, c04, c05, add_musicvideo_obj = [ "{MvideoId}","{FileId}","{Title}","{Runtime}","{Directors}","{Studio}","{Year}", "{Plot}","{Album}","{Artists}","{Genre}","{Index}","{Premiere}" ] -add_tvshow = """ INSERT INTO tvshow(idShow, c00, c01, c02, c04, c05, c08, c09, c12, c13, c14, c15) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +add_tvshow = """ INSERT INTO tvshow(idShow, c00, c01, c02, c04, c05, c08, c09, c10, c12, c13, c14, c15) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) """ add_tvshow_obj = [ "{ShowId}","{Title}","{Plot}","{Status}","{RatingId}","{Premiere}","{Genre}","{Title}", - "{Unique}","{Mpaa}","{Studio}","{SortTitle}" + "disintegrate browse bug", "{Unique}","{Mpaa}","{Studio}","{SortTitle}" ] add_season = """ INSERT INTO seasons(idSeason, idShow, season) VALUES (?, ?, ?) @@ -446,12 +446,12 @@ update_musicvideo_obj = [ "{Title}","{Runtime}","{Directors}","{Studio}"," "{Artists}","{Genre}","{Index}","{Premiere}","{MvideoId}" ] update_tvshow = """ UPDATE tvshow - SET c00 = ?, c01 = ?, c02 = ?, c04 = ?, c05 = ?, c08 = ?, c09 = ?, + SET c00 = ?, c01 = ?, c02 = ?, c04 = ?, c05 = ?, c08 = ?, c09 = ?, c10 = ?, c12 = ?, c13 = ?, c14 = ?, c15 = ? WHERE idShow = ? """ update_tvshow_obj = [ "{Title}","{Plot}","{Status}","{RatingId}","{Premiere}","{Genre}","{Title}", - "{Unique}","{Mpaa}","{Studio}","{SortTitle}","{ShowId}" + "disintegrate browse bug","{Unique}","{Mpaa}","{Studio}","{SortTitle}","{ShowId}" ] update_tvshow_link = """ INSERT OR REPLACE INTO tvshowlinkpath(idShow, idPath) VALUES (?, ?) From 60e60e953ba6c1f322128ed5ea4e98c9e2693301 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 25 Jan 2019 04:47:25 -0600 Subject: [PATCH 3/3] Version bump 4.0.1 --- addon.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 99b90dd8..e3789fe0 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ @@ -39,6 +39,7 @@ New stable release The wiki has been updated: https://github.com/MediaBrowser/plugin.video.emby/wiki + Small fixes