mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Merge pull request #161 from oddstr13/pr-migrate-config-pr-145-1
Add config migration for pr #145
This commit is contained in:
commit
51430d6aca
1 changed files with 18 additions and 0 deletions
|
@ -392,6 +392,24 @@ def get_credentials():
|
||||||
|
|
||||||
credentials['Servers'] = credentials.get('Servers', [])
|
credentials['Servers'] = credentials.get('Servers', [])
|
||||||
|
|
||||||
|
# Migration for #145
|
||||||
|
# TODO: CLEANUP for 1.0.0 release
|
||||||
|
for server in credentials['Servers']:
|
||||||
|
if 'ManualAddress' in server:
|
||||||
|
server['address'] = server['ManualAddress']
|
||||||
|
del server['ManualAddress']
|
||||||
|
# If manual is present, local should always be here, but better to be safe
|
||||||
|
if 'LocalAddress' in server:
|
||||||
|
del server['LocalAddress']
|
||||||
|
# Functionality removed in #60
|
||||||
|
if 'RemoteAddress' in server:
|
||||||
|
del server['RemoteAddress']
|
||||||
|
elif 'LocalAddress' in server:
|
||||||
|
server['address'] = server['LocalAddress']
|
||||||
|
del server['LocalAddress']
|
||||||
|
if 'LastConnectionMode' in server:
|
||||||
|
del server['LastConnectionMode']
|
||||||
|
|
||||||
return credentials
|
return credentials
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue