Skip to content

Commit a5a9155

Browse files
committed
Another Python35 json fix
1 parent fbb9bbf commit a5a9155

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/lib/favorites.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from kodiutils import (container_refresh, get_cache, get_proxies, get_setting, has_credentials,
1515
input_down, invalidate_caches, localize, log, log_error, multiselect,
16-
notification, ok_dialog, update_cache)
16+
notification, ok_dialog, to_unicode, update_cache)
1717

1818

1919
class Favorites:
@@ -45,9 +45,9 @@ def refresh(self, ttl=None):
4545
}
4646
req = Request('https://video-user-data.vrt.be/favorites', headers=headers)
4747
log(2, 'URL get: https://video-user-data.vrt.be/favorites')
48-
from json import load
48+
from json import loads
4949
try:
50-
favorites_json = load(urlopen(req))
50+
favorites_json = loads(to_unicode(urlopen(req).read()))
5151
except (TypeError, ValueError): # No JSON object could be decoded
5252
# Force favorites from cache
5353
favorites_json = get_cache('favorites.json', ttl=None)

0 commit comments

Comments
 (0)