fix(local-library): plex id double-prefix + scrim z-index over buttons
Two bugs from the same session:
- The plex_aggregated CTE prefixed `group_key` with `'plex:'`, but
`plex/mod.rs::plex_album_key()` already returns `"plex:<hash>"`.
Result: album.id was `"plex:plex:<hash>"` from the chunked path,
which `handleAlbumClick` couldn't resolve, so opening an album
showed NO TRACKS. Fixed: use `COALESCE(album_key, 'plex:' ||
rating_key)` so populated rows pass through untouched and only
the rating_key fallback gets the prefix added. GROUP BY mirrors
the same expression for consistency.
- On AlbumCardLibraryLite the scrim (`.cover-wrap::after`) and the
overlay container (`.overlay`) were both at `z-index: 2`. Pseudo-
elements paint after all DOM children at the same z-index, so
the scrim ended up ON TOP of the buttons, hiding them on hover.
Re-laid the layering so it's monotonic top-to-bottom:
1 cover img
2 scrim
3 overlay (action buttons)
4 select-checkbox + source-badge-slot
Plus: restored the dark `rgba(0,0,0,0.85)` hover scrim itself,
removed the `::after` accent-border ring + title-colour cue. Per the
2026-05-12 user call ("Hasta quisiera el overlay de regreso") — the
Plex thumbnail downscale (9f417999) made the scrim's opacity
transition cheap again since the underlying paint is now 220x220
not 1000x1000. Buttons go back to opacity 0 → 1 on hover with a
single transition on `.action-buttons`. White-outline circles
(transparent fill) since the scrim provides contrast.
cc
This commit is contained in:
2 files changed
+48
-49
No files matched your search
@@ -2005,7 +2005,10 @@ impl LibraryDatabase {
|
||||
r#",
|
||||
plex_aggregated AS (
|
||||
SELECT
|
||||
'plex:' || COALESCE(album_key, rating_key) AS group_key,
|
||||
-- `album_key` is populated by plex/mod.rs::plex_album_key()
|
||||
-- which already returns `"plex:<hash>"`. Only the
|
||||
-- rating_key fallback needs the prefix added.
|
||||
COALESCE(album_key, 'plex:' || rating_key) AS group_key,
|
||||
COALESCE(album, 'Unknown Album') AS title,
|
||||
CASE WHEN COUNT(DISTINCT artist) > 1
|
||||
THEN 'Various Artists'
|
||||
@@ -2023,7 +2026,7 @@ impl LibraryDatabase {
|
||||
CAST(NULL AS TEXT) AS source_folders,
|
||||
'plex' AS source
|
||||
FROM plex_cache.plex_cache_tracks
|
||||
GROUP BY COALESCE(album_key, rating_key)
|
||||
GROUP BY COALESCE(album_key, 'plex:' || rating_key)
|
||||
)"#
|
||||
} else {
|
||||
""
|
||||
@@ -2205,11 +2208,14 @@ impl LibraryDatabase {
|
||||
r#",
|
||||
plex_aggregated AS (
|
||||
SELECT
|
||||
'plex:' || COALESCE(album_key, rating_key) AS group_key,
|
||||
-- `album_key` is populated by plex/mod.rs::plex_album_key()
|
||||
-- which already returns `"plex:<hash>"`. Only the
|
||||
-- rating_key fallback needs the prefix added.
|
||||
COALESCE(album_key, 'plex:' || rating_key) AS group_key,
|
||||
COALESCE(album, 'Unknown Album') AS title,
|
||||
COALESCE(MIN(artist), 'Unknown Artist') AS artist
|
||||
FROM plex_cache.plex_cache_tracks
|
||||
GROUP BY COALESCE(album_key, rating_key)
|
||||
GROUP BY COALESCE(album_key, 'plex:' || rating_key)
|
||||
)"#
|
||||
} else {
|
||||
""
|
||||
|
||||
Reference in new issue
Block a user