Improve dialog to manually enter PMS IP and port
This commit is contained in:
parent
1dbeb95e24
commit
1071d75857
2 changed files with 21 additions and 7 deletions
|
@ -1081,6 +1081,16 @@ msgctxt "#39082"
|
||||||
msgid "Direct Paths"
|
msgid "Direct Paths"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
# Dialog for manually entering PMS
|
||||||
|
msgctxt "#39083"
|
||||||
|
msgid "Enter PMS IP or URL"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
# Dialog for manually entering PMS
|
||||||
|
msgctxt "#39084"
|
||||||
|
msgid "Enter PMS port"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#39200"
|
msgctxt "#39200"
|
||||||
msgid "Log-out Plex Home User "
|
msgid "Log-out Plex Home User "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1133,7 +1143,7 @@ msgid "Enter your Plex Media Server's IP or URL, Examples are:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#39217"
|
msgctxt "#39217"
|
||||||
msgid "Does your Plex Media Server support SSL connections? (https instead of http)?"
|
msgid "Use HTTPS (SSL) connections? With Kodi 18 or later, HTTPS will likely not work!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#39218"
|
msgctxt "#39218"
|
||||||
|
|
|
@ -70,20 +70,22 @@ class InitialSetup(object):
|
||||||
utils.window('plex_allows_mediaDeletion', value=value)
|
utils.window('plex_allows_mediaDeletion', value=value)
|
||||||
|
|
||||||
def enter_new_pms_address(self):
|
def enter_new_pms_address(self):
|
||||||
|
LOG.info('Start getting manual PMS address and port')
|
||||||
# "Enter your Plex Media Server's IP or URL. Examples are:"
|
# "Enter your Plex Media Server's IP or URL. Examples are:"
|
||||||
utils.messageDialog(utils.lang(29999),
|
utils.messageDialog(utils.lang(29999),
|
||||||
'%s\n%s\n%s' % (utils.lang(39215),
|
'%s\n%s\n%s' % (utils.lang(39215),
|
||||||
'192.168.1.2',
|
'192.168.1.2',
|
||||||
'plex.myServer.org'))
|
'plex.myServer.org'))
|
||||||
address = utils.dialog('input', "Enter PMS IP or URL")
|
# "Enter PMS IP or URL"
|
||||||
if address == '':
|
address = utils.dialog('input', utils.lang(39083))
|
||||||
|
if not address:
|
||||||
return False
|
return False
|
||||||
port = utils.dialog('input', "Enter PMS port", '32400', type='{numeric}')
|
port = utils.dialog('input', utils.lang(39084), '32400', type='{numeric}')
|
||||||
if port == '':
|
if not port:
|
||||||
return False
|
return False
|
||||||
url = '%s:%s' % (address, port)
|
url = '%s:%s' % (address, port)
|
||||||
# "Does your Plex Media Server support SSL connections?
|
# "Use HTTPS (SSL) connections? With Kodi 18 or later, HTTPS will likely
|
||||||
# (https instead of http)"
|
# not work!"
|
||||||
https = utils.yesno_dialog(utils.lang(29999), utils.lang(39217))
|
https = utils.yesno_dialog(utils.lang(29999), utils.lang(39217))
|
||||||
if https:
|
if https:
|
||||||
url = 'https://%s' % url
|
url = 'https://%s' % url
|
||||||
|
@ -92,6 +94,7 @@ class InitialSetup(object):
|
||||||
https = 'true' if https else 'false'
|
https = 'true' if https else 'false'
|
||||||
machine_identifier = PF.GetMachineIdentifier(url)
|
machine_identifier = PF.GetMachineIdentifier(url)
|
||||||
if machine_identifier is None:
|
if machine_identifier is None:
|
||||||
|
LOG.error('Could not get machine identifier')
|
||||||
# "Error contacting url
|
# "Error contacting url
|
||||||
# Abort (Yes) or save address anyway (No)"
|
# Abort (Yes) or save address anyway (No)"
|
||||||
if utils.yesno_dialog(utils.lang(29999),
|
if utils.yesno_dialog(utils.lang(29999),
|
||||||
|
@ -100,6 +103,7 @@ class InitialSetup(object):
|
||||||
utils.lang(39219))):
|
utils.lang(39219))):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
LOG.info('Saving manual address anyway')
|
||||||
utils.settings('plex_machineIdentifier', '')
|
utils.settings('plex_machineIdentifier', '')
|
||||||
else:
|
else:
|
||||||
utils.settings('plex_machineIdentifier', machine_identifier)
|
utils.settings('plex_machineIdentifier', machine_identifier)
|
||||||
|
|
Loading…
Reference in a new issue