mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
add featured artists to playlist page
+ fetch album bio on raising bottom container
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { Artist } from "./../../interfaces";
|
||||
import { defineStore } from "pinia";
|
||||
import { getPlaylist } from "../../composables/pages/playlists";
|
||||
import {
|
||||
getPlaylist,
|
||||
getPlaylistArtists,
|
||||
} from "../../composables/pages/playlists";
|
||||
import { Track, Playlist } from "../../interfaces";
|
||||
|
||||
export default defineStore("playlist-tracks", {
|
||||
state: () => ({
|
||||
info: <Playlist>{},
|
||||
tracks: <Track[]>[],
|
||||
artists: <Artist[]>[],
|
||||
}),
|
||||
actions: {
|
||||
/**
|
||||
@@ -18,6 +23,10 @@ export default defineStore("playlist-tracks", {
|
||||
this.info = playlist.info;
|
||||
this.tracks = playlist.tracks;
|
||||
},
|
||||
|
||||
async fetchArtists(playlistid: string) {
|
||||
this.artists = await getPlaylistArtists(playlistid);
|
||||
},
|
||||
/**
|
||||
* Updates the playlist header info. This is used when the playlist is
|
||||
* updated.
|
||||
|
||||
Reference in New Issue
Block a user