mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
merge changes
This commit is contained in:
commit
57156cfb1c
3 changed files with 22 additions and 7 deletions
11
default.py
11
default.py
|
@ -43,6 +43,17 @@ if mode == "play" or mode == "playfromaddon":
|
|||
elif mode == "reset":
|
||||
utils.reset()
|
||||
|
||||
elif mode == "resetauth":
|
||||
# User tried login and failed too many times
|
||||
resp = xbmcgui.Dialog().yesno("Warning", "Emby might lock your account if you fail to log in too many times. Proceed anyway?")
|
||||
if resp == 1:
|
||||
xbmc.log("Reset login attempts.")
|
||||
WINDOW.setProperty("Server_status", "Auth")
|
||||
else:
|
||||
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
|
||||
|
||||
|
||||
|
||||
if mode == "channels" or mode == "channelsfolder":
|
||||
id = params['id']
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ class UserClient(threading.Thread):
|
|||
|
||||
username = self.getUsername()
|
||||
w_token = self.WINDOW.getProperty('accessToken%s' % username)
|
||||
s_token = self.addon.getSetting('accessToken%s' % username)
|
||||
s_token = self.addon.getSetting('accessToken')
|
||||
|
||||
# Verify the window property
|
||||
if (w_token != ""):
|
||||
|
@ -272,7 +272,7 @@ class UserClient(threading.Thread):
|
|||
if (result != None and accessToken != None):
|
||||
self.currUser = username
|
||||
userId = result[u'User'][u'Id']
|
||||
addon.setSetting("accessToken%s" % username, accessToken)
|
||||
addon.setSetting("accessToken", accessToken)
|
||||
addon.setSetting("userId%s" % username, userId)
|
||||
self.logMsg("User Authenticated: %s" % accessToken)
|
||||
self.loadCurrUser()
|
||||
|
@ -281,15 +281,16 @@ class UserClient(threading.Thread):
|
|||
return
|
||||
else:
|
||||
self.logMsg("User authentication failed.")
|
||||
addon.setSetting("accessToken%s" % username, "")
|
||||
addon.setSetting("accessToken", "")
|
||||
addon.setSetting("userId%s" % username, "")
|
||||
xbmcgui.Dialog().ok("Error connecting", "Invalid username or password.")
|
||||
|
||||
# Give two attempts at entering password
|
||||
self.retry += 1
|
||||
if self.retry == 2:
|
||||
self.logMsg("Too many retries. Please restart Kodi.")
|
||||
self.logMsg("Too many retries. You can retry by selecting the option in the addon settings.")
|
||||
self.WINDOW.setProperty("Server_status", "Stop")
|
||||
xbmcgui.Dialog().ok("Error connecting", "Failed to authenticate too many times. You can retry by selecting the option in the addon settings.")
|
||||
|
||||
self.auth = False
|
||||
return
|
||||
|
|
|
@ -3,13 +3,16 @@
|
|||
<category label="30014"> <!-- Emby -->
|
||||
<setting id="ipaddress" type="text" label="30000" default="" visible="true" enable="true" />
|
||||
<setting id="port" type="text" label="30030" default="8096" visible="true" enable="true" />
|
||||
<setting id="username" type="text" label="30024" />
|
||||
<setting id="username" type="text" label="30024" default="" />
|
||||
<setting type="sep" />
|
||||
<setting id="https" type="bool" label="30243" visible="true" enable="true" default="false" />
|
||||
<setting id="sslverify" type="bool" label="Verify Host SSL Certificate" visible="eq(-1,true)" enable="true" default="false" />
|
||||
<setting id="sslcert" type="file" label="Client SSL certificate" visible="eq(-2,true)" enable="true" default="None" />
|
||||
<setting type="sep" />
|
||||
<setting id="deviceName" type="text" label="30016" default="Kodi" />
|
||||
<setting type="sep" />
|
||||
<setting id="accessToken" type="text" visible="false" default="" />
|
||||
<setting label="[COLOR yellow]Reset login attempts[/COLOR]" type="action" visible="eq(-1,) + !eq(-9,)" enable="true" action="RunPlugin(plugin://plugin.video.emby?mode=resetauth)" option="close" />
|
||||
</category>
|
||||
<category label="Sync Options">
|
||||
<!-- <setting id="syncMovieBoxSets" type="bool" label="30238" default="true" visible="true" enable="true" /> -->
|
||||
|
@ -21,8 +24,8 @@
|
|||
<setting id="autoPlaySeason" type="bool" label="30216" default="false" visible="true" enable="true" />
|
||||
<setting type="sep" />
|
||||
<setting id="playFromStream" type="bool" label="30002" visible="true" enable="true" default="false" />
|
||||
<setting id="videoBitRate" type="enum" label="30160" values="664 Kbps SD|996 Kbps HD|1.3 Mbps HD|2.0 Mbps HD|3.2 Mbps HD|4.7 Mbps HD|6.2 Mbps HD|7.7 Mbps HD|9.2 Mbps HD|10.7 Mbps HD|12.2 Mbps HD|13.7 Mbps HD|15.2 Mbps HD|16.7 Mbps HD|18.2 Mbps HD|20.0 Mbps HD|40.0 Mbps HD|100.0 Mbps HD [default]|1000.0 Mbps HD" default="17" />
|
||||
<setting id="forceTranscodingCodecs" type="text" label="30245" />
|
||||
<setting id="videoBitRate" type="enum" label="30160" values="664 Kbps SD|996 Kbps HD|1.3 Mbps HD|2.0 Mbps HD|3.2 Mbps HD|4.7 Mbps HD|6.2 Mbps HD|7.7 Mbps HD|9.2 Mbps HD|10.7 Mbps HD|12.2 Mbps HD|13.7 Mbps HD|15.2 Mbps HD|16.7 Mbps HD|18.2 Mbps HD|20.0 Mbps HD|40.0 Mbps HD|100.0 Mbps HD [default]|1000.0 Mbps HD" visible="eq(-1,true)" default="17" />
|
||||
<setting id="forceTranscodingCodecs" type="text" label="30245" visible="eq(-2,true)" />
|
||||
</category>
|
||||
<category label="Artwork">
|
||||
<setting id="disableCoverArt" type="bool" label="30157" default="false" visible="true" enable="true" />
|
||||
|
|
Loading…
Reference in a new issue