diff --git a/jellyfin_kodi/database/__init__.py b/jellyfin_kodi/database/__init__.py index 6498752a..92560b25 100644 --- a/jellyfin_kodi/database/__init__.py +++ b/jellyfin_kodi/database/__init__.py @@ -392,6 +392,24 @@ def get_credentials(): 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