diff --git a/jellyfin_apiclient_python/connection_manager.py b/jellyfin_apiclient_python/connection_manager.py index 1df32dd..79ce11d 100644 --- a/jellyfin_apiclient_python/connection_manager.py +++ b/jellyfin_apiclient_python/connection_manager.py @@ -6,6 +6,7 @@ import logging import socket from datetime import datetime +from enum import Enum from operator import itemgetter import urllib3 @@ -18,12 +19,11 @@ ################################################################################################# LOG = logging.getLogger('JELLYFIN.' + __name__) -CONNECTION_STATE = { - 'Unavailable': 0, - 'ServerSelection': 1, - 'ServerSignIn': 2, - 'SignedIn': 3 -} +class CONNECTION_STATE(Enum): + Unavailable = 0 + ServerSelection = 1 + ServerSignIn = 2 + SignedIn = 3 #################################################################################################