This repository was archived by the owner on May 9, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,17 +111,25 @@ def selector(self) -> "BaseSelector":
111111 @property
112112 def media_api (self ) -> "BaseApiClient" :
113113 if not self ._media_api :
114+ import httpx
115+
114116 from ...libs .media_api .api import create_api_client
115117
116118 media_api = create_api_client (self .config .general .media_api , self .config )
117119
118120 auth = self .auth
119121 if auth_profile := auth .get_auth ():
120- p = media_api .authenticate (auth_profile .token )
121- if p :
122- logger .debug (f"Authenticated as { p .name } " )
123- else :
124- logger .warning (f"Failed to authenticate with { auth_profile .token } " )
122+ try :
123+ p = media_api .authenticate (auth_profile .token )
124+ if p :
125+ logger .debug (f"Authenticated as { p .name } " )
126+ else :
127+ logger .warning (
128+ f"Failed to authenticate with { auth_profile .token } "
129+ )
130+ except httpx .ConnectError as e :
131+ logger .warning (f"It seems you are offline: { e } " )
132+
125133 else :
126134 logger .debug ("Not authenticated" )
127135 self ._media_api = media_api
You can’t perform that action at this time.
0 commit comments