From 43dd9fa7612628ca86a5bd763ff6995e22f68825 Mon Sep 17 00:00:00 2001 From: micha91 Date: Wed, 29 Mar 2023 21:36:23 +0200 Subject: [PATCH] Plex - Set a timeout of 10 seconds to connect to the server (#596) Set a timeout of 10 seconds to connect to the server. On connect all known addresses of the server are tried out and afterwards the best one (SSL over non SSL and local over remote) is used. The current timeout sometimes takes longer than the MA timeout of 30 seconds for the setup of a provider --- music_assistant/server/providers/plex/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music_assistant/server/providers/plex/__init__.py b/music_assistant/server/providers/plex/__init__.py index eaccf57a..b50f4ff2 100644 --- a/music_assistant/server/providers/plex/__init__.py +++ b/music_assistant/server/providers/plex/__init__.py @@ -101,7 +101,7 @@ class PlexProvider(MusicProvider): def connect(): plex_account = MyPlexAccount(token=self.config.get_value(CONF_AUTH_TOKEN)) - return plex_account.resource(self.config.get_value(CONF_SERVER_NAME)).connect(None) + return plex_account.resource(self.config.get_value(CONF_SERVER_NAME)).connect(None, 10) self._plex_server = await self._run_async(connect) self._plex_library = await self._run_async( -- 2.34.1