From 3d7a05cf24d934ad0d87ee669b5fb7157e8c09be Mon Sep 17 00:00:00 2001 From: mediaminister <45148099+mediaminister@users.noreply.github.com> Date: Wed, 1 Apr 2020 09:00:06 +0000 Subject: [PATCH] Py2/3 compatibility fixes (#16) --- resources/lib/modules/catalog.py | 2 +- resources/lib/viervijfzes/auth.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/modules/catalog.py b/resources/lib/modules/catalog.py index 9ff8e9c..72f4ba7 100644 --- a/resources/lib/modules/catalog.py +++ b/resources/lib/modules/catalog.py @@ -77,7 +77,7 @@ class Catalog: # Go directly to the season when we have only one season if len(program.seasons) == 1: - self.show_program_season(channel, program_id, program.seasons.values()[0].uuid) + self.show_program_season(channel, program_id, list(program.seasons.values())[0].uuid) return studio = CHANNELS.get(program.channel, {}).get('studio_icon') diff --git a/resources/lib/viervijfzes/auth.py b/resources/lib/viervijfzes/auth.py index 5c96e58..5bf14b7 100644 --- a/resources/lib/viervijfzes/auth.py +++ b/resources/lib/viervijfzes/auth.py @@ -80,7 +80,7 @@ class AuthApi: refresh_token=self._refresh_token, expiry=self._expiry, )) - fdesc.write(data.encode('utf8')) + fdesc.write(kodiutils.from_unicode(data)) return self._id_token