fix(custom): ignore selected_player if not defined. Fixes #419

This commit is contained in:
Sibren Vasse 2019-07-31 11:49:18 +02:00
parent 7a2dee7377
commit 7e9207d75c

View File

@ -45,7 +45,7 @@ def on_metadata(player, metadata, manager):
def on_player_appeared(manager, player, selected_player=None): def on_player_appeared(manager, player, selected_player=None):
if player is not None and player.name == selected_player: if player is not None and (selected_player is None or player.name == selected_player):
init_player(manager, player) init_player(manager, player)
else: else:
logger.debug("New player appeared, but it's not the selected player, skipping") logger.debug("New player appeared, but it's not the selected player, skipping")