Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on WAN IP Address #60

Merged
merged 2 commits into from
Sep 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions resources/lib/helper/loghandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def __init__(self):
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])

Expand Down
8 changes: 1 addition & 7 deletions resources/lib/jellyfin/core/connection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}
CONNECTION_MODE = {
'Local': 0,
'Remote': 1,
'Manual': 2
}

Expand All @@ -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):
Expand Down Expand Up @@ -215,8 +213,6 @@ def connect_to_server(self, server, options={}):
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

Expand Down Expand Up @@ -599,8 +595,6 @@ def _update_server_info(self, server, system_info):

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']}]

Expand Down
3 changes: 0 additions & 3 deletions resources/lib/jellyfin/core/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ def add_update_server(self, servers, server):
if server.get('ExchangeToken'):
existing['ExchangeToken'] = server['ExchangeToken']

if server.get('RemoteAddress'):
existing['RemoteAddress'] = server['RemoteAddress']

if server.get('ManualAddress'):
existing['ManualAddress'] = server['ManualAddress']

Expand Down