Merge branch 'main' into enhancement/lastfm

This commit is contained in:
Core 2022-06-16 14:29:02 +01:00
commit 4defeb82f0
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
3 changed files with 14 additions and 4 deletions

View file

@ -926,11 +926,18 @@ const app = new Vue({
}
})
// Used for Live Radio stations to set Metadata
this.mk.addEventListener(MusicKit.Events.timedMetadataDidChange, (e) => {
app.mk.nowPlayingItem.attributes.name = e.title
app.mk.nowPlayingItem.attributes.artistName = e.performer
app.mk.nowPlayingItem.attributes.albumName = e.album
app.currentArtUrl = e.links[0].url
if(e.links[1]) {
app.currentArtUrl = e.links[1].url
app.currentArtUrlRaw = e.links[1].url
}else{
app.currentArtUrl = e.links[0].url
app.currentArtUrlRaw = e.links[0].url
}
app.mk.nowPlayingItem._songId = e._adamId ? e._adamId : -1
app.mk.nowPlayingItem.id = e._adamId ? e._adamId : -1
})