/** * Navidrome MCP Server - MusicBrainz Web Service v2 client * Copyright (C) 2025 * SPDX-License-Identifier: AGPL-3.0-or-later */ /** * MusicBrainz blocks a client that exceeds 1 request per second or sends a generic User-Agent, so * every call goes through one module-level throttle with a descriptive User-Agent. */ import type { Config } from '../config.js'; export declare function resetMusicBrainzThrottleForTests(): void; export interface MbArtistMatch { mbid: string; name: string; score: number; disambiguation: string | null; } /** A low-score guess returns null, so the caller degrades instead of using a wrong artist. */ export declare function searchMbArtist(name: string, config: Config): Promise; /** * The canonical name feeds the Last.fm and Navidrome lookups, since Last.fm's own mbid lookup * misses on a stale index. */ export declare function lookupMbArtist(mbid: string, config: Config): Promise; export interface MbReleaseGroup { mbid: string; title: string; /** First release year. */ year: number | null; /** Capitalized as MB returns it, such as "Album". */ primaryType: string | null; /** Lowercased. MB returns "Remix" and "Live", and the exclude filter compares lowercase. */ secondaryTypes: string[]; /** Highest vote count first. */ genres: string[]; disambiguation: string | null; } /** `inc=genres` returns genres in the browse, so no per-album Last.fm getInfo call is needed. */ export declare function browseMbReleaseGroups(artistMbid: string, includeTypes: string[], config: Config): Promise; /** Search hits carry no genres and may omit secondary types, so both can be []. */ export interface MbReleaseGroupDetail extends MbReleaseGroup { /** First credited artist. */ artistName: string | null; } /** The canonical title and artist from an mbid feed the Last.fm and Navidrome lookups. */ export declare function lookupMbReleaseGroup(mbid: string, config: Config): Promise; export declare function searchMbReleaseGroup(artistName: string, albumTitle: string, config: Config): Promise; export interface MbTrack { /** Sequential across all media (1-based), so multi-disc albums read linearly. */ position: number; title: string; durationSeconds: number | null; } export interface MbTracklist { releaseMbid: string; status: string | null; date: string | null; country: string | null; tracks: MbTrack[]; } /** * MB is the primary tracklist source, since Last.fm durations are mostly null and its titles carry * feat suffixes (docs/ARTIST-ALBUMS-SPEC.md ยง9.1). */ export declare function browseMbReleaseTracklist(releaseGroupMbid: string, config: Config): Promise; //# sourceMappingURL=musicbrainz.d.ts.map