electron-store base for volume storing, fixes to window max/min handling

This commit is contained in:
Core 2021-12-16 17:17:18 +00:00
parent f193299996
commit 3fcf6f9faf
3 changed files with 55 additions and 20 deletions

View file

@ -275,6 +275,10 @@ const app = new Vue({
}
}
// Set the volume
ipcRenderer.invoke('getStoreValue', 'volume').then((value) => {
self.mk.volume = value
})
// load cached library
if (localStorage.getItem("librarySongs") != null) {
@ -396,6 +400,10 @@ const app = new Vue({
}
})
this.mk.addEventListener(MusicKit.Events.playbackVolumeDidChange, (_a) => {
ipcRenderer.invoke('setStoreValue', 'volume', this.mk.volume)
})
this.apiCall('https://api.music.apple.com/v1/me/library/playlists', res => {
self.playlists.listing = res.data
})