Complete rewrite of the artist image pipeline:
STORAGE:
- Migration 16: artist_images table tracking source, URL, path,
primary flag, dimensions per image (up to 10 per artist)
- Directory structure: artist-images/{mbid[:2]}/{mbid}/ with
primary.jpg + primary_sm.jpg/_md.jpg/_lg.jpg thumbnails
- Miss marker (.miss file) prevents re-fetching artists with no image
SOURCES (priority order):
1. MusicBrainz direct image relations (Wikimedia Commons)
2. Wikidata P18 property (Wikimedia Commons)
3. Wikipedia lead image (NEW — via Wikidata sitelinks → Wikipedia API)
Each source is checked, deduplicated, and the first available
image becomes the primary with sm/md/lg thumbnail generation
(100px/200px/400px, matching cover art tier sizes).
ASSET SERVING:
- /artist-images/ path registered with Wails asset handler
- Serves files via http.FileServer from the artist-images directory
- Same pattern as /covers/ for cover art
ARTIST MODEL:
- Artist struct gains ImageSmall/ImageMedium/ImageLarge fields
- resolveArtistImages does bulk MBID lookup → disk stat for each
- Populated in GetAllArtists and GetAllArtistsByLibrary
GRID VIEW:
- artists-view uses model URLs directly (no more base64 data URLs)
- Size selection based on imageSize * devicePixelRatio (like cover-grid)
- Removed batch GetArtistImages call and in-memory cache — no longer needed
92 lines
2.6 KiB
JavaScript
Executable File
92 lines
2.6 KiB
JavaScript
Executable File
// @ts-check
|
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
export function BrowseReleaseGroups(arg1) {
|
|
return window['go']['explore']['Service']['BrowseReleaseGroups'](arg1);
|
|
}
|
|
|
|
export function BrowseReleases(arg1) {
|
|
return window['go']['explore']['Service']['BrowseReleases'](arg1);
|
|
}
|
|
|
|
export function CheckLibraryMBIDs(arg1) {
|
|
return window['go']['explore']['Service']['CheckLibraryMBIDs'](arg1);
|
|
}
|
|
|
|
export function CoverArtGroupURL(arg1) {
|
|
return window['go']['explore']['Service']['CoverArtGroupURL'](arg1);
|
|
}
|
|
|
|
export function CoverArtURL(arg1) {
|
|
return window['go']['explore']['Service']['CoverArtURL'](arg1);
|
|
}
|
|
|
|
export function GetArtistImageURL(arg1) {
|
|
return window['go']['explore']['Service']['GetArtistImageURL'](arg1);
|
|
}
|
|
|
|
export function GetArtistImages(arg1) {
|
|
return window['go']['explore']['Service']['GetArtistImages'](arg1);
|
|
}
|
|
|
|
export function GetArtistMBID(arg1) {
|
|
return window['go']['explore']['Service']['GetArtistMBID'](arg1);
|
|
}
|
|
|
|
export function GetThumbnail(arg1, arg2, arg3) {
|
|
return window['go']['explore']['Service']['GetThumbnail'](arg1, arg2, arg3);
|
|
}
|
|
|
|
export function GetThumbnails(arg1) {
|
|
return window['go']['explore']['Service']['GetThumbnails'](arg1);
|
|
}
|
|
|
|
export function InvalidateIndexDiscographies() {
|
|
return window['go']['explore']['Service']['InvalidateIndexDiscographies']();
|
|
}
|
|
|
|
export function LookupArtist(arg1) {
|
|
return window['go']['explore']['Service']['LookupArtist'](arg1);
|
|
}
|
|
|
|
export function LookupReleaseGroup(arg1) {
|
|
return window['go']['explore']['Service']['LookupReleaseGroup'](arg1);
|
|
}
|
|
|
|
export function Search(arg1) {
|
|
return window['go']['explore']['Service']['Search'](arg1);
|
|
}
|
|
|
|
export function SearchArtists(arg1) {
|
|
return window['go']['explore']['Service']['SearchArtists'](arg1);
|
|
}
|
|
|
|
export function SearchRecordings(arg1) {
|
|
return window['go']['explore']['Service']['SearchRecordings'](arg1);
|
|
}
|
|
|
|
export function SearchReleaseGroups(arg1) {
|
|
return window['go']['explore']['Service']['SearchReleaseGroups'](arg1);
|
|
}
|
|
|
|
export function SetContext(arg1) {
|
|
return window['go']['explore']['Service']['SetContext'](arg1);
|
|
}
|
|
|
|
export function SimilarArtists(arg1) {
|
|
return window['go']['explore']['Service']['SimilarArtists'](arg1);
|
|
}
|
|
|
|
export function StartIndexBuild() {
|
|
return window['go']['explore']['Service']['StartIndexBuild']();
|
|
}
|
|
|
|
export function StopIndexBuild() {
|
|
return window['go']['explore']['Service']['StopIndexBuild']();
|
|
}
|
|
|
|
export function TopRecordingsForArtist(arg1) {
|
|
return window['go']['explore']['Service']['TopRecordingsForArtist'](arg1);
|
|
}
|