mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Merge pull request #60 from mcarlton00/wan-ip-removal
Remove dependency on WAN IP Address
This commit is contained in:
commit
31aa2073ad
3 changed files with 1 additions and 13 deletions
|
@ -53,9 +53,6 @@ class LogHandler(logging.StreamHandler):
|
|||
if server.get('LocalAddress'):
|
||||
self.sensitive['Server'].append(server['LocalAddress'].split('://')[1])
|
||||
|
||||
if server.get('RemoteAddress'):
|
||||
self.sensitive['Server'].append(server['RemoteAddress'].split('://')[1])
|
||||
|
||||
if server.get('ManualAddress'):
|
||||
self.sensitive['Server'].append(server['ManualAddress'].split('://')[1])
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ CONNECTION_STATE = {
|
|||
}
|
||||
CONNECTION_MODE = {
|
||||
'Local': 0,
|
||||
'Remote': 1,
|
||||
'Manual': 2
|
||||
}
|
||||
|
||||
|
@ -35,10 +34,9 @@ def get_server_address(server, mode):
|
|||
|
||||
modes = {
|
||||
CONNECTION_MODE['Local']: server.get('LocalAddress'),
|
||||
CONNECTION_MODE['Remote']: server.get('RemoteAddress'),
|
||||
CONNECTION_MODE['Manual']: server.get('ManualAddress')
|
||||
}
|
||||
return modes.get(mode) or server.get('ManualAddress', server.get('LocalAddress', server.get('RemoteAddress')))
|
||||
return modes.get(mode) or server.get('ManualAddress', server.get('LocalAddress'))
|
||||
|
||||
|
||||
class ConnectionManager(object):
|
||||
|
@ -215,8 +213,6 @@ class ConnectionManager(object):
|
|||
tests.append(CONNECTION_MODE['Manual'])
|
||||
if CONNECTION_MODE['Local'] not in tests:
|
||||
tests.append(CONNECTION_MODE['Local'])
|
||||
if CONNECTION_MODE['Remote'] not in tests:
|
||||
tests.append(CONNECTION_MODE['Remote'])
|
||||
|
||||
# TODO: begin to wake server
|
||||
|
||||
|
@ -599,8 +595,6 @@ class ConnectionManager(object):
|
|||
|
||||
if system_info.get('LocalAddress'):
|
||||
server['LocalAddress'] = system_info['LocalAddress']
|
||||
if system_info.get('WanAddress'):
|
||||
server['RemoteAddress'] = system_info['WanAddress']
|
||||
if 'MacAddress' in system_info:
|
||||
server['WakeOnLanInfos'] = [{'MacAddress': system_info['MacAddress']}]
|
||||
|
||||
|
|
|
@ -99,9 +99,6 @@ class Credentials(object):
|
|||
if server.get('ExchangeToken'):
|
||||
existing['ExchangeToken'] = server['ExchangeToken']
|
||||
|
||||
if server.get('RemoteAddress'):
|
||||
existing['RemoteAddress'] = server['RemoteAddress']
|
||||
|
||||
if server.get('ManualAddress'):
|
||||
existing['ManualAddress'] = server['ManualAddress']
|
||||
|
||||
|
|
Loading…
Reference in a new issue