make albums on artist page reactive

+ show artist name on artist album component on album page
+ attach artist page link to artist card
+ use small artist page on album header
+ use album color on genre banner on album page
This commit is contained in:
geoffrey45
2022-12-04 19:35:16 +03:00
committed by Mungai Njoroge
parent 075765088f
commit e54fea2d4d
14 changed files with 104 additions and 60 deletions
+4 -2
View File
@@ -85,10 +85,13 @@ function getSongItems() {
function getArtistAlbumComponents(): ScrollerItem[] {
return album.albumArtists.map((artist) => {
const artist_name = album.info.albumartists.find(
(a) => a.hash === artist.artisthash
)?.name;
return {
id: Math.random().toString(),
component: ArtistAlbums,
props: { artist },
props: { title: `More from ${artist_name}`, albums: artist.albums },
size: 20 * 16,
};
});
@@ -113,7 +116,6 @@ const scrollerItems = computed(() => {
});
function playFromAlbum(index: number) {
const { title, albumartists, albumhash } = album.info;
queue.playFromAlbum(title, albumhash, album.allTracks);
queue.play(index);