Merge pull request #128 from mcarlton00/remove-default-port

Remove default connection port
This commit is contained in:
Abby 2019-11-03 15:46:08 +00:00 committed by GitHub
commit 3775f4a79a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 7 additions and 103 deletions

View file

@ -56,10 +56,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Benutzername" msgstr "Benutzername"
msgctxt "#30030"
msgid "Port number"
msgstr "Portnummer"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Löschen von Dateien bestätigen" msgstr "Löschen von Dateien bestätigen"

View file

@ -50,10 +50,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "" msgstr ""
msgctxt "#30030"
msgid "Port number"
msgstr ""
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "" msgstr ""

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Nombre de usuario" msgstr "Nombre de usuario"
msgctxt "#30030"
msgid "Port number"
msgstr "Puerto"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Conformar borrado de archivo" msgstr "Conformar borrado de archivo"

View file

@ -54,10 +54,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Nom d'utilisateur" msgstr "Nom d'utilisateur"
msgctxt "#30030"
msgid "Port number"
msgstr "Numéro du port"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Confirmer la suppression du fichier" msgstr "Confirmer la suppression du fichier"

View file

@ -54,10 +54,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Nome utente" msgstr "Nome utente"
msgctxt "#30030"
msgid "Port number"
msgstr "Numero porta"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Conferma eliminazione file" msgstr "Conferma eliminazione file"

View file

@ -50,10 +50,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "" msgstr ""
msgctxt "#30030"
msgid "Port number"
msgstr ""
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "" msgstr ""

View file

@ -50,10 +50,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "" msgstr ""
msgctxt "#30030"
msgid "Port number"
msgstr ""
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "" msgstr ""

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "사용자 이름" msgstr "사용자 이름"
msgctxt "#30030"
msgid "Port number"
msgstr "포트"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "파일 삭제 확인" msgstr "파일 삭제 확인"

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Brukernavn" msgstr "Brukernavn"
msgctxt "#30030"
msgid "Port number"
msgstr "Portnummer"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Bekreft sletting av fil" msgstr "Bekreft sletting av fil"

View file

@ -54,10 +54,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Gebruikersnaam" msgstr "Gebruikersnaam"
msgctxt "#30030"
msgid "Port number"
msgstr "Poort nummer"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Bestand verwijderen bevestigen" msgstr "Bestand verwijderen bevestigen"

View file

@ -54,10 +54,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Nazwa użytkownika" msgstr "Nazwa użytkownika"
msgctxt "#30030"
msgid "Port number"
msgstr "Port"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Potwierdzanie usuwania plików" msgstr "Potwierdzanie usuwania plików"

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Nome de Usuário" msgstr "Nome de Usuário"
msgctxt "#30030"
msgid "Port number"
msgstr "Número da porta"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Confirme exclusão de arquivo" msgstr "Confirme exclusão de arquivo"

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Nome de Utilizador" msgstr "Nome de Utilizador"
msgctxt "#30030"
msgid "Port number"
msgstr "Porta"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Confirme a remoção do ficheiro" msgstr "Confirme a remoção do ficheiro"

View file

@ -54,10 +54,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Имя пользователя" msgstr "Имя пользователя"
msgctxt "#30030"
msgid "Port number"
msgstr "Номер порта"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Подтверить удаление файла" msgstr "Подтверить удаление файла"

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "Používateľské meno" msgstr "Používateľské meno"
msgctxt "#30030"
msgid "Port number"
msgstr "Číslo portu"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "Potvrdiť vymazanie súboru" msgstr "Potvrdiť vymazanie súboru"

View file

@ -53,10 +53,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "用户名" msgstr "用户名"
msgctxt "#30030"
msgid "Port number"
msgstr "端口号"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "确认删除文件" msgstr "确认删除文件"

View file

@ -50,10 +50,6 @@ msgctxt "#30024"
msgid "Username" msgid "Username"
msgstr "用户名" msgstr "用户名"
msgctxt "#30030"
msgid "Port number"
msgstr "端口号"
msgctxt "#30091" msgctxt "#30091"
msgid "Confirm file deletion" msgid "Confirm file deletion"
msgstr "确认文件删除" msgstr "确认文件删除"

View file

@ -60,16 +60,12 @@ class ServerManual(xbmcgui.WindowXMLDialog):
self.error_toggle = self.getControl(ERROR_TOGGLE) self.error_toggle = self.getControl(ERROR_TOGGLE)
self.error_msg = self.getControl(ERROR_MSG) self.error_msg = self.getControl(ERROR_MSG)
self.host_field = self._add_editcontrol(755, 433, 40, 415) self.host_field = self._add_editcontrol(755, 433, 40, 415)
self.port_field = self._add_editcontrol(755, 543, 40, 415)
self.port_field.setText('8096')
self.setFocus(self.host_field) self.setFocus(self.host_field)
self.host_field.controlUp(self.cancel_button) self.host_field.controlUp(self.cancel_button)
self.host_field.controlDown(self.port_field) self.host_field.controlDown(self.connect_button)
self.port_field.controlUp(self.host_field) self.connect_button.controlUp(self.host_field)
self.port_field.controlDown(self.connect_button)
self.connect_button.controlUp(self.port_field)
self.cancel_button.controlDown(self.host_field) self.cancel_button.controlDown(self.host_field)
def onClick(self, control): def onClick(self, control):
@ -78,14 +74,13 @@ class ServerManual(xbmcgui.WindowXMLDialog):
self._disable_error() self._disable_error()
server = self.host_field.getText() server = self.host_field.getText()
port = self.port_field.getText()
if not server: if not server:
# Display error # Display error
self._error(ERROR['Empty'], _('empty_server')) self._error(ERROR['Empty'], _('empty_server'))
LOG.error("Server cannot be null") LOG.error("Server cannot be null")
elif self._connect_to_server(server, port): elif self._connect_to_server(server):
self.close() self.close()
elif control == CANCEL: elif control == CANCEL:
@ -94,7 +89,7 @@ class ServerManual(xbmcgui.WindowXMLDialog):
def onAction(self, action): def onAction(self, action):
if self.error == ERROR['Empty'] and self.host_field.getText() and self.port_field.getText(): if self.error == ERROR['Empty'] and self.host_field.getText():
self._disable_error() self._disable_error()
if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU): if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU):
@ -117,13 +112,12 @@ class ServerManual(xbmcgui.WindowXMLDialog):
self.addControl(control) self.addControl(control)
return control return control
def _connect_to_server(self, server, port): def _connect_to_server(self, server):
if _IPV6_RE.match(server): if _IPV6_RE.match(server):
server = "[%s]" % (server) server = "[%s]" % (server)
server_address = "%s:%s" % (server, port) if port else server self._message("%s %s..." % (_(30610), server))
self._message("%s %s..." % (_(30610), server_address)) result = self.connect_manager.connect_to_address(server)
result = self.connect_manager.connect_to_address(server_address)
if result['State'] == CONNECTION_STATE['Unavailable']: if result['State'] == CONNECTION_STATE['Unavailable']:
self._message(_(30609)) self._message(_(30609))

View file

@ -80,28 +80,6 @@
<texture colordiffuse="ff525252">white.png</texture> <texture colordiffuse="ff525252">white.png</texture>
</control> </control>
</control> </control>
<control type="group" id="102">
<height>110</height>
<control type="label">
<label>$ADDON[plugin.video.jellyfin 30030]</label>
<textcolor>ffe1e1e1</textcolor>
<textshadow>66000000</textshadow>
<font>font12</font>
<aligny>top</aligny>
<textoffsetx>20</textoffsetx>
</control>
<control type="label">
<height>50</height>
</control>
<control type="image">
<description>separator</description>
<left>20</left>
<right>20</right>
<height>1</height>
<top>90</top>
<texture colordiffuse="ff525252">white.png</texture>
</control>
</control>
<control type="button" id="200"> <control type="button" id="200">
<label>[B]$ADDON[plugin.video.jellyfin 30616][/B]</label> <label>[B]$ADDON[plugin.video.jellyfin 30616][/B]</label>
<width>426</width> <width>426</width>