Skip to content

Commit

Permalink
fix: handle invalid start_index when receiving command player status (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wiflye81 authored Nov 28, 2023
1 parent 31321d3 commit 621c427
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions music_assistant/server/providers/slimproto/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ def _handle_players(
"""Handle players command."""
players: list[PlayerItem] = []
for index, mass_player in enumerate(self.mass.players.all()):
if not isinstance(start_index, int):
start_index = 0
if isinstance(start_index, int) and index < start_index:
continue
if len(players) > limit:
Expand Down

0 comments on commit 621c427

Please sign in to comment.