feat: Library Only mode — toggle, search, artist page, similar artists

Backend:
- Migration 17: similar_artist_map table stores per-artist similar
  artist relationships (source_mbid → similar_mbid + name + score)
- Tier 4 index build now persists similar artists to this table
- GetLibrarySimilarArtists(mbid) queries similar artists filtered
  by JOIN with the artists table (library-only, no API calls)
- Added db field to explore.Service for direct queries

Frontend:
- ExploreSettingsStore with libraryOnly toggle, persisted to
  localStorage
- Top bar toggle button with active/inactive styling
- Explore search: skips full MB/LB pipeline when library-only,
  uses only searchLibraryCache (pure JS, instant)
- Artist detail page: in library-only mode, skips all API calls
  (no top tracks, no top releases, no LB play count, no MB
  artist lookup). Uses library store for discography, calls
  GetLibrarySimilarArtists for similar artists.
- Similar artists section: changed from horizontal scroll to
  wrapping flex layout with collapsible toggle (Show all N)
- Removed debug artist ranking log
This commit is contained in:
2026-03-30 15:36:37 -04:00
parent 6440b0333c
commit d73226b173
11 changed files with 278 additions and 24 deletions
+31
View File
@@ -40,6 +40,37 @@ p {
flex: 0 1 320px;
}
.library-only-toggle {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border: 1px solid var(--yj-border-subtle, rgba(255, 255, 255, 0.12));
border-radius: 6px;
background: transparent;
color: var(--yj-text-secondary, #b3b3b3);
font-size: 12px;
cursor: pointer;
transition: all 0.15s ease;
white-space: nowrap;
flex-shrink: 0;
}
.library-only-toggle:hover {
background: var(--yj-bg-overlay, rgba(255, 255, 255, 0.06));
color: var(--yj-text-primary, #fff);
}
.library-only-toggle.active {
background: var(--yj-accent, #ffd43b);
color: #000;
border-color: var(--yj-accent, #ffd43b);
}
.library-only-toggle wa-icon {
font-size: 14px;
}
ul {
list-style-type: none;
}