CoverArtProxy now checks three sources in order: 1. Local library (instant) — matches by album+artist name against the release_groups/cover_art tables. Albums the user already owns show their local cover art immediately. 2. Disk cache (instant) — previously fetched CAA thumbnails. 3. Cover Art Archive (network) — fetches and caches to disk. Library index is built once on first access (sync.Once) from a single SQL query joining release_groups → cover_art → artists. Keyed by lowercased 'album\x00artist' for exact name matching. GetThumbnail now takes (mbid, albumName, artistName) so the proxy can check the library before falling back to CAA. Frontend passes the album title and artist credit from the search result.
33 lines
1.3 KiB
TypeScript
Executable File
33 lines
1.3 KiB
TypeScript
Executable File
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
import {explore} from '../models';
|
|
import {context} from '../models';
|
|
|
|
export function BrowseReleaseGroups(arg1:string):Promise<Array<explore.MBReleaseGroup>>;
|
|
|
|
export function BrowseReleases(arg1:string):Promise<Array<explore.MBRelease>>;
|
|
|
|
export function CoverArtGroupURL(arg1:string):Promise<string>;
|
|
|
|
export function CoverArtURL(arg1:string):Promise<string>;
|
|
|
|
export function GetThumbnail(arg1:string, arg2:string, arg3:string):Promise<string>;
|
|
|
|
export function LookupArtist(arg1:string):Promise<explore.MBArtist>;
|
|
|
|
export function LookupReleaseGroup(arg1:string):Promise<explore.MBReleaseGroup>;
|
|
|
|
export function Search(arg1:string):Promise<explore.MBSearchResult>;
|
|
|
|
export function SearchArtists(arg1:string):Promise<Array<explore.MBArtist>>;
|
|
|
|
export function SearchRecordings(arg1:string):Promise<Array<explore.MBRecording>>;
|
|
|
|
export function SearchReleaseGroups(arg1:string):Promise<Array<explore.MBReleaseGroup>>;
|
|
|
|
export function SetContext(arg1:context.Context):Promise<void>;
|
|
|
|
export function SimilarArtists(arg1:string):Promise<Array<explore.LBSimilarArtist>>;
|
|
|
|
export function TopRecordingsForArtist(arg1:string):Promise<Array<explore.LBTopRecording>>;
|