feat: 'In Library' badges, artist images on local pages, MBID-based Tier 3
Three features wired together: 1. 'In Library' badges on explore search results: CheckLibraryMBIDs Wails binding batch-checks which search result MBIDs exist in the local library. Green badges render on matching artist cards and album cards. 2. Artist images on local artist-details page: Local artist pages now call GetArtistMBID(name) to resolve the MBID from tags, then GetArtistImageURL(mbid) to fetch the cached Wikimedia photo. Falls back to initial-letter avatar. 3. Tier 3 search index uses direct MBIDs from tags: buildTier3Library now reads artists.mbid column (from audio tags) for direct MBID matching, falling back to name matching for untagged artists. Eliminates false matches and catches artists that name matching misses.
This commit is contained in:
+3
@@ -35,3 +35,6 @@ export function SimilarArtists(arg1:string):Promise<Array<explore.LBSimilarArtis
|
||||
|
||||
export function TopRecordingsForArtist(arg1:string):Promise<Array<explore.LBTopRecording>>;
|
||||
|
||||
export function CheckLibraryMBIDs(arg1:string[]):Promise<Record<string, string>>;
|
||||
|
||||
export function GetArtistMBID(arg1:string):Promise<string>;
|
||||
|
||||
@@ -65,3 +65,11 @@ export function SimilarArtists(arg1) {
|
||||
export function TopRecordingsForArtist(arg1) {
|
||||
return window['go']['explore']['Service']['TopRecordingsForArtist'](arg1);
|
||||
}
|
||||
|
||||
export function CheckLibraryMBIDs(arg1) {
|
||||
return window['go']['explore']['Service']['CheckLibraryMBIDs'](arg1);
|
||||
}
|
||||
|
||||
export function GetArtistMBID(arg1) {
|
||||
return window['go']['explore']['Service']['GetArtistMBID'](arg1);
|
||||
}
|
||||
|
||||
@@ -196,6 +196,23 @@ export namespace explore {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
export class ThumbnailRequest {
|
||||
mbid: string;
|
||||
albumName: string;
|
||||
artistName: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ThumbnailRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.mbid = source["mbid"];
|
||||
this.albumName = source["albumName"];
|
||||
this.artistName = source["artistName"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user