albums: one page for every record, and streamed history rows that actually open
Three things were wrong with opening an album, and only one of them was the one that got reported. The reported half: clicking a local record in the sidebar's history went to the old in-library album view. Local albums carry no catalog identity of any kind -- `albums.mbid` is null and is not even in the DTO -- so there was nothing to route with. openAlbumByName already existed for exactly this (the now-playing links use it, and it requires BOTH artist and title to match normalized, which is the namesake guard); it now reports whether it resolved and caches settled answers, so a second click is instant. The unreported half, and the reason "half of them are not working": every STREAMED row was dead. catalog_album_id is TEXT in SQLite, so it arrives as a string, and `catalog_album` takes a u64 -- the invoke was rejected outright with "invalid type: string ... expected u64". Terrestrials, OK Human and 9 all failed silently on click. The id is coerced in checkedAlbumPayload now, where both other string sources (page seeds) pass through too. And the part that made the first half unfixable: a record no catalog carries had nowhere to go. Panda Bear's "A ? of WHEN" is not on Deezer, so no amount of resolving would ever open it. Local albums now render on the SAME page, composed from the library's own data -- its tracks, durations, bitrates and the cover already on disk -- under a namespaced `lib:` id that can never collide with a Deezer one. Playback stays local: Play and any row queue the files you already have rather than sending a record you own back through the resolver. Save is not offered (it is already saved), previews are absent (there is nothing to preview), and the attribution footer credits your library rather than claiming Deezer + MusicBrainz. With that, the old view has no callers and is deleted: the album-page block, its CSS, and the members that only it used. Nothing anywhere routes to it. Verified live: all six history rows open the new page, a Home card opens it, Play queues 14 local FLACs without streaming, and the back arrow returns.
This commit is contained in:
1 parent
3c5bccf1b6
commit
dde8c7510b
9 files changed
+252
-365
No files matched your search
+7
-1
@@ -53,7 +53,7 @@
|
||||
cancels the pane's top padding so a page's artwork can run underneath it,
|
||||
and the page restores that inset for its own content. Without it the page
|
||||
renders 24px too high; with it but not listed here, 24px too low. */
|
||||
const BAR_VIEWS = new Set(["catalogArtist", "catalogAlbum"]);
|
||||
const BAR_VIEWS = new Set(["catalogArtist", "catalogAlbum", "catalog"]);
|
||||
|
||||
initEvents();
|
||||
autoConnect();
|
||||
@@ -180,6 +180,12 @@
|
||||
it: the glass bar bleeds up over it, cancels it for what follows, and
|
||||
each page under the bar restores it as its own padding-top. */
|
||||
--pane-pad: 24px;
|
||||
/* The glass bar's height, declared HERE rather than on the bar so pages
|
||||
can clear it. A page with a hero (artist, album) wants its artwork to
|
||||
run underneath the bar and only takes --pane-pad back; a page with no
|
||||
artwork behind the bar (search) has to start below it, or its first
|
||||
heading sits under the frost at rest. */
|
||||
--bar-h: 46px;
|
||||
border-radius: var(--radius);
|
||||
overflow-y: auto;
|
||||
overflow-anchor: none;
|
||||
|
||||
Reference in new issue
Block a user