${releaseGroups.map((rg) => {
- const artURL = CoverArtGroupURL(rg.mbid);
+ const cachedArt = this.thumbnailCache.get(rg.mbid);
+ const artURL = cachedArt || CoverArtGroupURL(rg.mbid);
const year = extractYear(rg.firstReleaseDate);
+
+ // Kick off async thumbnail fetch if not cached.
+ if (!cachedArt) {
+ this.loadThumbnail(rg.mbid);
+ }
+
return html`
>;
-export interface MBArtist {
- mbid: string;
- name: string;
- sortName: string;
- type: string;
- country: string;
- disambiguation: string;
- score: number;
-}
+export function BrowseReleases(arg1:string):Promise
>;
-export interface MBReleaseGroup {
- mbid: string;
- title: string;
- primaryType: string;
- secondaryTypes?: string[];
- firstReleaseDate: string;
- artistCredit: string;
-}
-
-export interface MBRecording {
- mbid: string;
- title: string;
- length: number;
- artistCredit: string;
- score: number;
-}
-
-export interface MBRelease {
- mbid: string;
- title: string;
- date: string;
- country: string;
- status: string;
- tracks?: MBTrack[];
-}
-
-export interface MBTrack {
- position: number;
- discNumber: number;
- title: string;
- length: number;
- mbid: string;
-}
-
-export interface MBSearchResult {
- artists?: MBArtist[];
- releaseGroups?: MBReleaseGroup[];
- recordings?: MBRecording[];
-}
-
-export interface LBTopRecording {
- recordingMbid: string;
- artistName: string;
- trackName: string;
- totalListenCount: number;
-}
-
-export interface LBSimilarArtist {
- artistMbid: string;
- name: string;
- score: number;
-}
-
-// -- Service methods ------------------------------------------------
-
-export function Search(arg1:string):Promise;
-
-export function SearchArtists(arg1:string):Promise>;
-
-export function SearchReleaseGroups(arg1:string):Promise>;
-
-export function SearchRecordings(arg1:string):Promise>;
-
-export function LookupArtist(arg1:string):Promise;
-
-export function LookupReleaseGroup(arg1:string):Promise;
-
-export function BrowseReleaseGroups(arg1:string):Promise>;
-
-export function BrowseReleases(arg1:string):Promise>;
-
-export function TopRecordingsForArtist(arg1:string):Promise>;
-
-export function SimilarArtists(arg1:string):Promise>;
+export function CoverArtGroupURL(arg1:string):Promise;
export function CoverArtURL(arg1:string):Promise;
-export function CoverArtGroupURL(arg1:string):Promise;
+export function LookupArtist(arg1:string):Promise;
+
+export function LookupReleaseGroup(arg1:string):Promise;
+
+export function Search(arg1:string):Promise;
+
+export function SearchArtists(arg1:string):Promise>;
+
+export function SearchRecordings(arg1:string):Promise>;
+
+export function SearchReleaseGroups(arg1:string):Promise>;
+
+export function SetContext(arg1:context.Context):Promise;
+
+export function SimilarArtists(arg1:string):Promise>;
+
+export function TopRecordingsForArtist(arg1:string):Promise>;
+
+export function GetThumbnail(arg1:string):Promise;
diff --git a/frontend/wailsjs/go/explore/Service.js b/frontend/wailsjs/go/explore/Service.js
old mode 100644
new mode 100755
index 7cb06de..d711217
--- a/frontend/wailsjs/go/explore/Service.js
+++ b/frontend/wailsjs/go/explore/Service.js
@@ -2,20 +2,20 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
-export function Search(arg1) {
- return window['go']['explore']['Service']['Search'](arg1);
+export function BrowseReleaseGroups(arg1) {
+ return window['go']['explore']['Service']['BrowseReleaseGroups'](arg1);
}
-export function SearchArtists(arg1) {
- return window['go']['explore']['Service']['SearchArtists'](arg1);
+export function BrowseReleases(arg1) {
+ return window['go']['explore']['Service']['BrowseReleases'](arg1);
}
-export function SearchReleaseGroups(arg1) {
- return window['go']['explore']['Service']['SearchReleaseGroups'](arg1);
+export function CoverArtGroupURL(arg1) {
+ return window['go']['explore']['Service']['CoverArtGroupURL'](arg1);
}
-export function SearchRecordings(arg1) {
- return window['go']['explore']['Service']['SearchRecordings'](arg1);
+export function CoverArtURL(arg1) {
+ return window['go']['explore']['Service']['CoverArtURL'](arg1);
}
export function LookupArtist(arg1) {
@@ -26,26 +26,34 @@ export function LookupReleaseGroup(arg1) {
return window['go']['explore']['Service']['LookupReleaseGroup'](arg1);
}
-export function BrowseReleaseGroups(arg1) {
- return window['go']['explore']['Service']['BrowseReleaseGroups'](arg1);
+export function Search(arg1) {
+ return window['go']['explore']['Service']['Search'](arg1);
}
-export function BrowseReleases(arg1) {
- return window['go']['explore']['Service']['BrowseReleases'](arg1);
+export function SearchArtists(arg1) {
+ return window['go']['explore']['Service']['SearchArtists'](arg1);
}
-export function TopRecordingsForArtist(arg1) {
- return window['go']['explore']['Service']['TopRecordingsForArtist'](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 CoverArtURL(arg1) {
- return window['go']['explore']['Service']['CoverArtURL'](arg1);
+export function TopRecordingsForArtist(arg1) {
+ return window['go']['explore']['Service']['TopRecordingsForArtist'](arg1);
}
-export function CoverArtGroupURL(arg1) {
- return window['go']['explore']['Service']['CoverArtGroupURL'](arg1);
+export function GetThumbnail(arg1) {
+ return window['go']['explore']['Service']['GetThumbnail'](arg1);
}