aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/music-app.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/music-app.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/music-app.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/music-app.js b/packages/meshbay-hub/src/meshbay_hub/static/music-app.js
index 418da89..616f169 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/music-app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/music-app.js
@@ -5,6 +5,7 @@ import { t } from './i18n.js';
import { Icon } from './icon.js';
import { MediaThumb, LazyTile } from './video-app.js';
import { formatTime } from './music-player.js';
+import { SourceTag } from './group-name.js';
// -- Music --------------------------------------------------------------------
//
@@ -264,9 +265,7 @@ function AlbumCard({ album, transportRef, gekRef, musicbrainzEnabled, onOpen })
<div class="music-card-info">
<div class="music-card-title">${album.album}</div>
<div class="music-card-sub">${album.artist}</div>
- ${repTrack.groupName && html`
- <div class="music-card-group">${repTrack.groupName}</div>
- `}
+ <${SourceTag} entries=${album.tracks} cls="music-card-group" />
</div>
</div>
`;
@@ -525,4 +524,10 @@ function MusicApp({
`;
}
-export { MusicApp, groupMusicEntries, bumpMusicMetaGeneration };
+// foldKey rides along for the Search page's merge unit keys
+// (docs/refactoring-search.md ยง5.2). An album's *display* strings are the
+// first-seen spelling, and which group is seen first is the order its index
+// happened to arrive in โ€” so keying a unit on them would let the chosen source
+// change between page loads. The folded key is the one grouping actually used,
+// and is stable.
+export { MusicApp, groupMusicEntries, bumpMusicMetaGeneration, foldKey };