From 231d6972d7a023e9358ab7deda509baac49006cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E8=8A=AD=E8=80=81=E7=88=B9?= <37040069+stanly0726@users.noreply.github.com> Date: Fri, 3 May 2024 14:47:41 +0800 Subject: [PATCH] fix: custom module mediaplayer doesn't respect argument (#3198) fix custom module mediaplayer which doesn't consider --exclude argument on player appear --- resources/custom_modules/mediaplayer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/custom_modules/mediaplayer.py b/resources/custom_modules/mediaplayer.py index 4aea4171..acc47496 100755 --- a/resources/custom_modules/mediaplayer.py +++ b/resources/custom_modules/mediaplayer.py @@ -136,6 +136,10 @@ class PlayerManager: def on_player_appeared(self, _, player): logger.info(f"Player has appeared: {player.name}") + if player.name in self.excluded_player: + logger.debug( + "New player appeared, but it's in exclude player list, skipping") + return if player is not None and (self.selected_player is None or player.name == self.selected_player): self.init_player(player) else: