Generate a new unique Plex device ID in settings

Nice if you copy/paste your Kodi profile
This commit is contained in:
tomkat83 2016-03-24 08:26:08 +01:00
parent f2f6805759
commit bca89c3a9a
5 changed files with 7 additions and 5 deletions

View file

@ -297,7 +297,7 @@
<string id="30532">Duration of the video library pop up (in seconds)</string> <string id="30532">Duration of the video library pop up (in seconds)</string>
<string id="30533">Duration of the music library pop up (in seconds)</string> <string id="30533">Duration of the music library pop up (in seconds)</string>
<string id="30534">Server messages</string> <string id="30534">Server messages</string>
<string id="30535">Generate a new device Id</string> <string id="30535">[COLOR yellow]Generate a new unique device Id (e.g. when cloning Kodi)[/COLOR]</string>
<string id="30536">Users must log in every time when Kodi restarts</string> <string id="30536">Users must log in every time when Kodi restarts</string>
<string id="30537">Restart Kodi if you make changes</string> <string id="30537">Restart Kodi if you make changes</string>
<string id="30538">Complete Re-Sync necessary</string> <string id="30538">Complete Re-Sync necessary</string>

View file

@ -24,6 +24,7 @@
<string id="30521">Bei Wiederaufnahme zurückspulen (in Sekunden)</string> <string id="30521">Bei Wiederaufnahme zurückspulen (in Sekunden)</string>
<string id="30505">[COLOR yellow]Anzahl Login-Versuche zurücksetzen[/COLOR]</string> <string id="30505">[COLOR yellow]Anzahl Login-Versuche zurücksetzen[/COLOR]</string>
<string id="30535">[COLOR yellow]Neue einzigartige Geräte-ID generieren (z.B. wenn Kodi geklont wurde)[/COLOR]</string>
<string id="30536">Benutzer müssen sich bei jedem Neustart von Kodi neu anmelden</string> <string id="30536">Benutzer müssen sich bei jedem Neustart von Kodi neu anmelden</string>
<string id="30537">Bei Änderungen Kodi neu starten</string> <string id="30537">Bei Änderungen Kodi neu starten</string>
<string id="30538">Komplette Neusynchronisierung nötig</string> <string id="30538">Komplette Neusynchronisierung nötig</string>

View file

@ -69,7 +69,7 @@ class ClientInfo():
If id does not exist, create one and save in Kodi settings file. If id does not exist, create one and save in Kodi settings file.
""" """
if reset: if reset is True:
utils.window('plex_client_Id', clear=True) utils.window('plex_client_Id', clear=True)
utils.settings('plex_client_Id', value="") utils.settings('plex_client_Id', value="")
@ -78,7 +78,8 @@ class ClientInfo():
return clientId return clientId
clientId = utils.settings('plex_client_Id') clientId = utils.settings('plex_client_Id')
if clientId: # Because Kodi appears to cache file settings!!
if clientId != "" and reset is False:
utils.window('plex_client_Id', value=clientId) utils.window('plex_client_Id', value=clientId)
self.logMsg("Unique device Id plex_client_Id loaded: %s" % clientId, 1) self.logMsg("Unique device Id plex_client_Id loaded: %s" % clientId, 1)
return clientId return clientId

View file

@ -288,9 +288,8 @@ def resetDeviceId():
dialog = xbmcgui.Dialog() dialog = xbmcgui.Dialog()
language = utils.language language = utils.language
deviceId_old = utils.window('emby_deviceId') deviceId_old = utils.window('plex_client_Id')
try: try:
utils.window('emby_deviceId', clear=True)
deviceId = clientinfo.ClientInfo().getDeviceId(reset=True) deviceId = clientinfo.ClientInfo().getDeviceId(reset=True)
except Exception as e: except Exception as e:
utils.logMsg(addonName, utils.logMsg(addonName,

View file

@ -122,6 +122,7 @@
<setting id="connectMsg" type="bool" label="30249" default="true" /> <setting id="connectMsg" type="bool" label="30249" default="true" />
<setting label="39018" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=repair)" option="close" /> <!-- Repair local database (force update all content) --> <setting label="39018" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=repair)" option="close" /> <!-- Repair local database (force update all content) -->
<setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache --> <setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache -->
<setting label="30535" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=deviceid)" /><!-- Reset device id uuid -->
<setting label="39021" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=thememedia)" option="close" visible="false" /> <!-- Sync Plex Theme Media to Kodi --> <setting label="39021" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=thememedia)" option="close" visible="false" /> <!-- Sync Plex Theme Media to Kodi -->
<setting type="lsep" label="39049" /><!-- Nothing works? Try a full reset --> <setting type="lsep" label="39049" /><!-- Nothing works? Try a full reset -->
<setting label="39019" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=reset)" option="close" /> <!-- Partial or full reset of Database and PKC --> <setting label="39019" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=reset)" option="close" /> <!-- Partial or full reset of Database and PKC -->