electron-store base for volume storing, fixes to window max/min handling
This commit is contained in:
parent
f193299996
commit
3fcf6f9faf
3 changed files with 55 additions and 20 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue