mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-15 13:55:08 +00:00
Change most string occurrences of Emby to Jellyfin (case sensitive)
This commit is contained in:
parent
168bab2b01
commit
59c1dd42e3
79 changed files with 833 additions and 832 deletions
|
@ -15,7 +15,7 @@ from helper.utils import create_id
|
|||
|
||||
##################################################################################################
|
||||
|
||||
LOG = logging.getLogger("EMBY."+__name__)
|
||||
LOG = logging.getLogger("JELLYFIN."+__name__)
|
||||
|
||||
##################################################################################################
|
||||
|
||||
|
@ -71,13 +71,13 @@ def get_device_name():
|
|||
def get_device_id(reset=False):
|
||||
|
||||
''' Return the device_id if already loaded.
|
||||
It will load from emby_guid file. If it's a fresh
|
||||
It will load from jellyfin_guid file. If it's a fresh
|
||||
setup, it will generate a new GUID to uniquely
|
||||
identify the setup for all users.
|
||||
|
||||
window prop: emby_deviceId
|
||||
window prop: jellyfin_deviceId
|
||||
'''
|
||||
client_id = window('emby_deviceId')
|
||||
client_id = window('jellyfin_deviceId')
|
||||
|
||||
if client_id:
|
||||
return client_id
|
||||
|
@ -87,29 +87,29 @@ def get_device_id(reset=False):
|
|||
if not xbmcvfs.exists(directory):
|
||||
xbmcvfs.mkdir(directory)
|
||||
|
||||
emby_guid = os.path.join(directory, "emby_guid")
|
||||
file_guid = xbmcvfs.File(emby_guid)
|
||||
jellyfin_guid = os.path.join(directory, "jellyfin_guid")
|
||||
file_guid = xbmcvfs.File(jellyfin_guid)
|
||||
client_id = file_guid.read()
|
||||
|
||||
if not client_id or reset:
|
||||
LOG.info("Generating a new GUID.")
|
||||
|
||||
client_id = str("%012X" % create_id())
|
||||
file_guid = xbmcvfs.File(emby_guid, 'w')
|
||||
file_guid = xbmcvfs.File(jellyfin_guid, 'w')
|
||||
file_guid.write(client_id)
|
||||
|
||||
file_guid.close()
|
||||
|
||||
LOG.info("DeviceId loaded: %s", client_id)
|
||||
window('emby_deviceId', value=client_id)
|
||||
window('jellyfin_deviceId', value=client_id)
|
||||
|
||||
return client_id
|
||||
|
||||
def reset_device_id():
|
||||
|
||||
window('emby_deviceId', clear=True)
|
||||
window('jellyfin_deviceId', clear=True)
|
||||
get_device_id(True)
|
||||
dialog("ok", heading="{emby}", line1=_(33033))
|
||||
dialog("ok", heading="{jellyfin}", line1=_(33033))
|
||||
xbmc.executebuiltin('RestartApp')
|
||||
|
||||
def get_info():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue