mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-18 06:06:14 +00:00
Add option to generate a new device Id
This commit is contained in:
parent
a0acdd6a7a
commit
dfa5c7b313
5 changed files with 35 additions and 2 deletions
|
@ -69,7 +69,7 @@ class ClientInfo():
|
|||
else:
|
||||
return "Unknown"
|
||||
|
||||
def getDeviceId(self):
|
||||
def getDeviceId(self, reset=False):
|
||||
|
||||
clientId = utils.window('emby_deviceId')
|
||||
if clientId:
|
||||
|
@ -81,6 +81,10 @@ class ClientInfo():
|
|||
else:
|
||||
GUID_file = xbmc.translatePath(os.path.join(addon_path.encode("utf-8"), "machine_guid")).decode('utf-8')
|
||||
|
||||
if reset and xbmcvfs.exists(GUID_file):
|
||||
# Reset the file
|
||||
xbmcvfs.delete(GUID_file)
|
||||
|
||||
GUID = xbmcvfs.File(GUID_file)
|
||||
clientId = GUID.read()
|
||||
if not clientId:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue