fix: custom module mediaplayer doesn't respect argument (#3198)

fix custom module mediaplayer which doesn't consider  --exclude argument on player appear
master
柳芭老爹 2024-05-03 14:47:41 +08:00 committed by GitHub
parent 50476edc98
commit 231d6972d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ class PlayerManager:
def on_player_appeared(self, _, player): def on_player_appeared(self, _, player):
logger.info(f"Player has appeared: {player.name}") 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): if player is not None and (self.selected_player is None or player.name == self.selected_player):
self.init_player(player) self.init_player(player)
else: else: