mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Add reset password dialog to addon menu
This commit is contained in:
parent
3f63b3d0e0
commit
22b5d413fd
5 changed files with 16 additions and 2 deletions
|
@ -253,8 +253,9 @@ class Connect(object):
|
|||
client.set_credentials(get_credentials())
|
||||
manager = client.auth
|
||||
|
||||
username = settings('username')
|
||||
try:
|
||||
self.login_manual(manager=manager)
|
||||
self.login_manual(user=username, manager=manager)
|
||||
except RuntimeError:
|
||||
return
|
||||
|
||||
|
|
|
@ -112,6 +112,8 @@ class Events(object):
|
|||
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.jellyfin)')
|
||||
elif mode == 'adduser':
|
||||
add_user()
|
||||
elif mode == 'updatepassword':
|
||||
event('UpdatePassword')
|
||||
elif mode == 'thememedia':
|
||||
get_themes()
|
||||
elif mode == 'managelibs':
|
||||
|
@ -177,6 +179,7 @@ def listing():
|
|||
directory(translate(33134), "plugin://plugin.video.jellyfin/?mode=addserver", False)
|
||||
directory(translate(33054), "plugin://plugin.video.jellyfin/?mode=adduser", False)
|
||||
directory(translate(5), "plugin://plugin.video.jellyfin/?mode=settings", False)
|
||||
directory(translate(33161), "plugin://plugin.video.jellyfin/?mode=updatepassword", False)
|
||||
directory(translate(33058), "plugin://plugin.video.jellyfin/?mode=reset", False)
|
||||
directory(translate(33180), "plugin://plugin.video.jellyfin/?mode=restartservice", False)
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ class Service(xbmc.Monitor):
|
|||
'LibraryChanged', 'ServerOnline', 'SyncLibrary', 'RepairLibrary', 'RemoveLibrary',
|
||||
'SyncLibrarySelection', 'RepairLibrarySelection', 'AddServer',
|
||||
'Unauthorized', 'UserConfigurationUpdated', 'ServerRestarting',
|
||||
'RemoveServer', 'AddLibrarySelection', 'RemoveLibrarySelection'):
|
||||
'RemoveServer', 'UpdatePassword', 'AddLibrarySelection', 'RemoveLibrarySelection'):
|
||||
return
|
||||
|
||||
data = json.loads(data)[0]
|
||||
|
@ -243,6 +243,8 @@ class Service(xbmc.Monitor):
|
|||
self.connect.remove_server(data['Id'])
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
elif method == 'UpdatePassword':
|
||||
self.connect.setup_login_manual()
|
||||
elif method == 'UserDataChanged' and self.library_thread:
|
||||
if data.get('ServerId') or not window('jellyfin_startup.bool'):
|
||||
return
|
||||
|
|
|
@ -801,6 +801,10 @@ msgctxt "#33160"
|
|||
msgid "To avoid errors, please update Jellyfin for Kodi to version: "
|
||||
msgstr "To avoid errors, please update Jellyfin for Kodi to version: "
|
||||
|
||||
msgctxt "#33161"
|
||||
msgid "Update password"
|
||||
msgstr "Update password"
|
||||
|
||||
msgctxt "#33162"
|
||||
msgid "Reset the music library?"
|
||||
msgstr "Reset the music library?"
|
||||
|
|
|
@ -801,6 +801,10 @@ msgctxt "#33160"
|
|||
msgid "To avoid errors, please update Jellyfin for Kodi to version: "
|
||||
msgstr "To avoid errors, please update Jellyfin for Kodi to version: "
|
||||
|
||||
msgctxt "#33161"
|
||||
msgid "Update password"
|
||||
msgstr "Update password"
|
||||
|
||||
msgctxt "#33162"
|
||||
msgid "Reset the music library?"
|
||||
msgstr "Reset the music library?"
|
||||
|
|
Loading…
Reference in a new issue