Skip to content

Commit

Permalink
Fix: Check if metadata job exists before clearing it
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Nov 4, 2024
1 parent fdc942f commit 0b78ba0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion music_assistant/controllers/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,4 +805,9 @@ def _put(self, item: str) -> None:

def pop(self, item: str) -> None:
"""Remove item from queue."""
self._queue.remove(item)
if self.exists(item):
self._queue.remove(item)

def exists(self, item: str) -> bool:
"""Check if item exists in queue."""
return item in self._queue

0 comments on commit 0b78ba0

Please sign in to comment.