attach artist page link to ArtistName component

+ separate fetching artist albums with fetching artist info
+ include limit when fetching artist albums
+ refactor interfaces
This commit is contained in:
geoffrey45
2022-12-05 18:27:55 +03:00
committed by Mungai Njoroge
parent e54fea2d4d
commit 580dce1da9
14 changed files with 162 additions and 53 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ function getSongItems() {
function getArtistAlbumComponents(): ScrollerItem[] {
return album.albumArtists.map((artist) => {
const artist_name = album.info.albumartists.find(
(a) => a.hash === artist.artisthash
(a) => a.artisthash === artist.artisthash
)?.name;
return {
id: Math.random().toString(),
@@ -121,7 +121,7 @@ function playFromAlbum(index: number) {
queue.play(index);
}
onBeforeRouteUpdate(async (to: RouteLocationNormalized) => {
onBeforeRouteUpdate(async (to) => {
await album.fetchTracksAndArtists(to.params.hash.toString()).then(() => {
album.resetQuery();
album.resetAlbumArtists();