Silence logging in plex provider
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 19 Dec 2025 02:20:00 +0000 (03:20 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 19 Dec 2025 02:20:00 +0000 (03:20 +0100)
music_assistant/providers/plex/__init__.py

index 68b877d5e955dd8b4b6337f6ea111c16e044c067..4a4238438ecd60bc14f5b88a84c885b887371f6c 100644 (file)
@@ -426,6 +426,10 @@ class PlexProvider(MusicProvider):
         """Set up the music provider by connecting to the server."""
         # silence loggers
         logging.getLogger("plexapi").setLevel(self.logger.level + 10)
+        # silence urllib3 InsecureRequestWarning when certificate verification is disabled
+        # this is expected when connecting to Plex servers using their wildcard certificates
+        # that don't validate against LAN IP addresses
+        logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR)
         _, library_name = str(self.config.get_value(CONF_LIBRARY_ID)).split(" / ", 1)
 
         def connect() -> PlexServer: