Exposed songid in attributes, reimplemented lastfm primary artist scrobbling, cleaned up mkinterop

This commit is contained in:
Core 2022-07-30 17:42:15 +01:00
parent 6370ef3003
commit d4eac9a17c
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
3 changed files with 32 additions and 14 deletions

View file

@ -949,12 +949,6 @@ const app = new Vue({
}
});
this.mk.addEventListener(MusicKit.Events.playbackProgressDidChange, () => {
if (self.mk.currentPlaybackProgress === (app.cfg.connectivity.lastfm.scrobble_after / 100)) {
ipcRenderer.send('lastfm:scrobbleTrack', MusicKitInterop.getAttributes());
}
})
this.mk.addEventListener(MusicKit.Events.playbackStateDidChange, (event) => {
ipcRenderer.send('wsapi-updatePlaybackState', wsapi.getAttributes());
document.body.setAttribute("playback-state", event.state == 2 ? "playing" : "paused")