Skip to content

Commit

Permalink
Fix: Correct maxsize of MetadataLookupQueue (#1805)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijc authored Dec 16, 2024
1 parent 47f4ce6 commit cf77b99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions music_assistant/controllers/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(self, *args, **kwargs) -> None:
"Music Assistant's core controller which handles all metadata for music."
)
self.manifest.icon = "book-information-variant"
self._lookup_jobs: MetadataLookupQueue = MetadataLookupQueue()
self._lookup_jobs: MetadataLookupQueue = MetadataLookupQueue(100)
self._lookup_task: asyncio.Task | None = None
self._throttler = Throttler(1, 30)
self._missing_metadata_scan_task: asyncio.Task | None = None
Expand Down Expand Up @@ -796,7 +796,7 @@ async def _scan_missing_metadata(self) -> None:
class MetadataLookupQueue(asyncio.Queue):
"""Representation of a queue for metadata lookups."""

def _init(self, maxlen: int = 100):
def _init(self, maxlen: int):
self._queue: collections.deque[str] = collections.deque(maxlen=maxlen)

def _put(self, item: str) -> None:
Expand Down

0 comments on commit cf77b99

Please sign in to comment.