diff --git a/resources/lib/clientinfo.py b/resources/lib/clientinfo.py index ee8a0b05..a6ab90ec 100644 --- a/resources/lib/clientinfo.py +++ b/resources/lib/clientinfo.py @@ -10,7 +10,7 @@ import xbmc import xbmcaddon import xbmcvfs -from utils import window, settings +from utils import window, settings, create_id ################################################################################################## @@ -85,7 +85,7 @@ class ClientInfo(object): client_id = guid.read() if not client_id: log.info("Generating a new guid...") - client_id = str("%012X" % uuid4()) + client_id = str("%012X" % create_id()) guid = xbmcvfs.File(emby_guid, 'w') guid.write(client_id) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 759b04f1..5b400450 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -14,6 +14,7 @@ import urllib import unicodedata import xml.etree.ElementTree as etree from datetime import datetime +from uuid import uuid4 import xbmc @@ -81,6 +82,8 @@ def dialog(type_, *args, **kwargs): def urllib_path(plugin, params): return "%s?%s" % (plugin, urllib.urlencode(params)) +def create_id(): + return uuid4() class JSONRPC(object):