You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
Assume we have two SqueezeBoxes named 'Kids Bedroom' &
'Parents Bedroom'.
What steps will reproduce the problem?
Server.get_player("rent")
Server.get_player("Bedroom")
What is the expected output? What do you see instead?
Should return None, but returns the player 'Parents Bedroom'
Should return None or False, but returns the first found
player with 'Bedroom' in its name.
What version of the product are you using? On what operating system?
r51 (Aug 14, 2011)
Please provide any additional information below.
Add an option to get_player() to search strictly or loosely.
=>>
def get_player(self, ref=None, strictly=False):
ref = str(ref).lower()
if ref:
for player in self.players:
player_name = str(player.name).lower()
player_ref = str(player.ref).lower()
if ref == player_ref or
(not strictly and ref in player_name) or
(strictly and ref == player_name):
return player
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Assume we have two SqueezeBoxes named 'Kids Bedroom' &
'Parents Bedroom'.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
player with 'Bedroom' in its name.
What version of the product are you using? On what operating system?
r51 (Aug 14, 2011)
Please provide any additional information below.
Add an option to get_player() to search strictly or loosely.
=>>
def get_player(self, ref=None, strictly=False):
ref = str(ref).lower()
if ref:
for player in self.players:
player_name = str(player.name).lower()
player_ref = str(player.ref).lower()
if ref == player_ref or
(not strictly and ref in player_name) or
(strictly and ref == player_name):
return player
The text was updated successfully, but these errors were encountered: