Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions resources/lib/favorites.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from kodiutils import (container_refresh, get_cache, get_proxies, get_setting, has_credentials,
input_down, invalidate_caches, localize, log, log_error, multiselect,
notification, ok_dialog, update_cache)
notification, ok_dialog, to_unicode, update_cache)


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