From 0561411e5461fefeda52ed42e352e6213ea96481 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 5 Feb 2025 08:55:15 +0100 Subject: [PATCH] Chore: Fix browse for filesystem provider --- music_assistant/providers/filesystem_local/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/music_assistant/providers/filesystem_local/__init__.py b/music_assistant/providers/filesystem_local/__init__.py index 038876ac..b9f52054 100644 --- a/music_assistant/providers/filesystem_local/__init__.py +++ b/music_assistant/providers/filesystem_local/__init__.py @@ -8,7 +8,7 @@ import logging import os import os.path import time -from collections.abc import AsyncGenerator, Iterator +from collections.abc import AsyncGenerator, Iterator, Sequence from typing import TYPE_CHECKING, Any, cast import aiofiles @@ -249,11 +249,15 @@ class LocalFileSystemProvider(MusicProvider): ) return result - async def browse(self, path: str) -> list[MediaItemType | ItemMapping]: + async def browse(self, path: str) -> Sequence[MediaItemType | ItemMapping]: """Browse this provider's items. :param path: The path to browse, (e.g. provid://artists). """ + if self.media_content_type in ("audiobooks", "podcasts"): + # for audiobooks and podcasts just use the default implementation + # so we dont have to deal with multi-part audiobooks and podcast episodes + return await super().browse(path) items: list[MediaItemType | ItemMapping] = [] item_path = path.split("://", 1)[1] if not item_path: -- 2.34.1