Plex connect server dialog
This commit is contained in:
parent
92a5eac7be
commit
78f6ad7da8
5 changed files with 44 additions and 12 deletions
|
@ -1155,6 +1155,28 @@ msgctxt "#30545"
|
|||
msgid "Force transcode pictures"
|
||||
msgstr ""
|
||||
|
||||
|
||||
# Server selection dialog: button text to sign in or sign out of plex.tv
|
||||
msgctxt "#30600"
|
||||
msgid "Toggle plex.tv sign-in"
|
||||
msgstr ""
|
||||
|
||||
# Server selection dialog: button text to add server manually
|
||||
msgctxt "#30601"
|
||||
msgid "Manually add server"
|
||||
msgstr ""
|
||||
|
||||
# Button text, e.g. to cancel a dialog
|
||||
msgctxt "#30602"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
# Server selection dialog: button text to select the main PMS
|
||||
msgctxt "#30607"
|
||||
msgid "Select main PMS"
|
||||
msgstr ""
|
||||
|
||||
|
||||
# service add-on
|
||||
|
||||
msgctxt "#33000"
|
||||
|
|
|
@ -96,7 +96,15 @@ class ConnectManager(object):
|
|||
"""
|
||||
Will return selected server or raise RuntimeError
|
||||
"""
|
||||
dia = ServerConnect("script-emby-connect-server.xml", *XML_PATH)
|
||||
dia = ServerConnect("script-plex-connect-server.xml", *XML_PATH)
|
||||
kwargs = {
|
||||
'connect_manager': None, # self._connect
|
||||
'username': settings('username'),
|
||||
'user_image': window('PlexUserImage'),
|
||||
# 'servers': state.get('Servers') or [],
|
||||
# 'emby_connect': False if user else True
|
||||
}
|
||||
dia.set_args(**kwargs)
|
||||
dia.doModal()
|
||||
|
||||
if dia.is_server_selected():
|
||||
|
@ -106,7 +114,6 @@ class ConnectManager(object):
|
|||
elif dia._is_connect_login():
|
||||
log.debug("Login to plex.tv")
|
||||
try:
|
||||
# Login to emby connect
|
||||
self._login_connect()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
@ -270,7 +277,10 @@ class ConnectManager(object):
|
|||
if not self.server or not self.serverid:
|
||||
show_dialog = True
|
||||
if show_dialog is True:
|
||||
try:
|
||||
server = self.select_servers()
|
||||
except RuntimeError:
|
||||
pass
|
||||
log.info("Server: %s", server)
|
||||
server = self.__user_pick_pms()
|
||||
else:
|
||||
|
|
|
@ -69,7 +69,7 @@ class ServerConnect(xbmcgui.WindowXMLDialog):
|
|||
server_type = "wifi" if server.get('ExchangeToken') else "network"
|
||||
self.list_.addItem(self._add_listitem(server['Name'], server['Id'], server_type))
|
||||
|
||||
self.getControl(USER_NAME).setLabel("%s %s" % ('Switch plex.tv user', self.username.decode('utf-8')))
|
||||
self.getControl(USER_NAME).setLabel("%s %s" % (lang(33000), self.username.decode('utf-8')))
|
||||
|
||||
if self.user_image is not None:
|
||||
self.getControl(USER_IMAGE).setImage(self.user_image)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<texture>logo-white.png</texture>
|
||||
<aspectratio>keep</aspectratio>
|
||||
<width>120</width>
|
||||
<height>49</height>
|
||||
<height>120</height>
|
||||
<top>30</top>
|
||||
<left>25</left>
|
||||
</control>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<control type="label">
|
||||
<description>Select server</description>
|
||||
<textcolor>ffa6a6a6</textcolor>
|
||||
<label>$ADDON[plugin.video.emby 30607]</label>
|
||||
<label>$ADDON[plugin.video.plexkodiconnect 30607]</label>
|
||||
<font>font10</font>
|
||||
<align>center</align>
|
||||
<aligny>top</aligny>
|
||||
|
@ -202,10 +202,10 @@
|
|||
<height>150</height>
|
||||
<control type="button" id="205">
|
||||
<visible>True</visible>
|
||||
<description>Sign in Connect</description>
|
||||
<texturenofocus border="5" colordiffuse="ff0b8628">box.png</texturenofocus>
|
||||
<texturefocus border="5" colordiffuse="ff13a134">box.png</texturefocus>
|
||||
<label>[UPPERCASE][B]$ADDON[plugin.video.emby 30600][/B][/UPPERCASE]</label>
|
||||
<description>Toggle plex.tv sign-in</description>
|
||||
<texturenofocus border="5" colordiffuse="ff464646">box.png</texturenofocus>
|
||||
<texturefocus border="5" colordiffuse="ff525252">box.png</texturefocus>
|
||||
<label>$ADDON[plugin.video.plexkodiconnect 30600]</label>
|
||||
<font>font10</font>
|
||||
<textcolor>ffa6a6a6</textcolor>
|
||||
<focusedcolor>white</focusedcolor>
|
||||
|
@ -221,7 +221,7 @@
|
|||
<description>Manually add server</description>
|
||||
<texturenofocus border="5" colordiffuse="ff464646">box.png</texturenofocus>
|
||||
<texturefocus border="5" colordiffuse="ff525252">box.png</texturefocus>
|
||||
<label>[UPPERCASE][B]$ADDON[plugin.video.emby 30611][/B][/UPPERCASE]</label>
|
||||
<label>$ADDON[plugin.video.plexkodiconnect 30601]</label>
|
||||
<font>font10</font>
|
||||
<textcolor>ffa6a6a6</textcolor>
|
||||
<focusedcolor>white</focusedcolor>
|
||||
|
@ -239,7 +239,7 @@
|
|||
<description>Cancel</description>
|
||||
<texturenofocus border="5" colordiffuse="ff464646">box.png</texturenofocus>
|
||||
<texturefocus border="5" colordiffuse="ff525252">box.png</texturefocus>
|
||||
<label>[UPPERCASE][B]$ADDON[plugin.video.emby 30606][/B][/UPPERCASE]</label>
|
||||
<label>$ADDON[plugin.video.plexkodiconnect 30602]</label>
|
||||
<font>font10</font>
|
||||
<textcolor>ffa6a6a6</textcolor>
|
||||
<focusedcolor>white</focusedcolor>
|
Binary file not shown.
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 8.2 KiB |
Loading…
Reference in a new issue