Fix HLS playback auth + add DNB matching source
Player: hls.js did not send Authorization header for segment requests, causing 401 errors on all HLS fetches. Fixed via xhrSetup callback. DNB: Added Deutsche Nationalbibliothek SRU search (mat=ton filter for audiobooks, MARC21-XML parsing). Extracts title, author, narrator, publisher, year, series, genres, ISBN-based cover URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@ from .matching.base import MatchResult
|
||||
from .matching.musicbrainz import search_musicbrainz, get_release_details
|
||||
from .matching.open_library import search_open_library, get_work_details
|
||||
from .matching.google_books import search_google_books
|
||||
from .matching.dnb import search_dnb
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -165,6 +166,7 @@ _SOURCE_FUNCS = {
|
||||
"musicbrainz": (search_musicbrainz, get_release_details),
|
||||
"open_library": (search_open_library, get_work_details),
|
||||
"google_books": (search_google_books, None),
|
||||
"dnb": (search_dnb, None),
|
||||
}
|
||||
|
||||
|
||||
@@ -260,13 +262,14 @@ async def search_for_item(title: str, author: str | None = None) -> list[dict]:
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
mb, ol, gb = await asyncio.gather(
|
||||
mb, ol, gb, dnb = await asyncio.gather(
|
||||
_search_source(search_musicbrainz(title, author)),
|
||||
_search_source(search_open_library(title, author)),
|
||||
_search_source(search_google_books(title, author)),
|
||||
_search_source(search_dnb(title, author)),
|
||||
)
|
||||
|
||||
for r in mb + ol + gb:
|
||||
for r in mb + ol + gb + dnb:
|
||||
results.append({
|
||||
"source": r.source,
|
||||
"id": r.source_id,
|
||||
|
||||
Reference in New Issue
Block a user