feat: MBIDs in library models + local-first search + explore cache
Backend: - Added mbid column to sqlc schemas for artists and release_groups - Regenerated sqlc queries to SELECT mbid in artist/album queries - Added MBID field to library.Artist and library.Album Go structs - All GetAllArtists/GetAllAlbums variants now populate MBID Frontend: - Updated Wails models.ts with MBID fields on Artist and Album - Added cachedArtists/cachedAlbums getters to LibraryStore - searchLibraryCache now includes MBIDs and local cover art URLs so library results can navigate to explore detail pages - Added mergeWithLibrary() — when full MB results arrive, library entries are enriched with local images and 'In Library' flags rather than being replaced by MB-only versions - Created ExploreCache store for cross-page data sharing: search results populate the cache, detail pages can read from it to avoid redundant API calls for already-fetched data
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
type Artist struct {
|
||||
ID int64
|
||||
Name string
|
||||
Mbid sql.NullString
|
||||
}
|
||||
|
||||
type ArtistCredit struct {
|
||||
@@ -154,6 +155,7 @@ type ReleaseGroup struct {
|
||||
Year sql.NullInt64
|
||||
TotalTracks sql.NullInt64
|
||||
TotalDiscs sql.NullInt64
|
||||
Mbid sql.NullString
|
||||
}
|
||||
|
||||
type ReleaseGroupRecording struct {
|
||||
|
||||
Reference in New Issue
Block a user