artist clicking fallback to primary artist if multiple artists
This commit is contained in:
parent
6a4346028e
commit
23a889e11a
2 changed files with 13 additions and 4 deletions
|
@ -4535,8 +4535,13 @@ const app = new Vue({
|
|||
{
|
||||
icon: "./assets/feather/user.svg",
|
||||
name: app.getLz("action.goToArtist"),
|
||||
action: function () {
|
||||
app.appRoute(`artist/${app.mk.nowPlayingItem.relationships.artists.data[0].id}`);
|
||||
action: async function () {
|
||||
if (app.mk.nowPlayingItem.relationships.artists.data[0].id) {
|
||||
app.appRoute(`artist/${app.mk.nowPlayingItem.relationships.artists.data[0].id}`);
|
||||
} else {
|
||||
const id = await MusicKitInterop.fetchPrimaryArtist("id")
|
||||
app.appRoute(`artist/${id}`);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue