floating point errors resolved
changed some logs to debugs
This commit is contained in:
parent
93bf5652d2
commit
adf1a18be7
2 changed files with 8 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
global.ipcRenderer = require('electron').ipcRenderer;
|
||||
console.log('Loaded Preload')
|
||||
console.info('Loaded Preload')
|
||||
|
||||
let cache = {playParams: {id: 0}, status: null, remainingTime: 0},
|
||||
playbackCache = {status: null, time: Date.now()};
|
||||
|
@ -24,7 +24,7 @@ const MusicKitInterop = {
|
|||
/** wsapi */
|
||||
|
||||
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
|
||||
console.log('nowPlayingItemDidChange')
|
||||
console.debug('nowPlayingItemDidChange')
|
||||
const attributes = MusicKitInterop.getAttributes()
|
||||
const trackFilter = MusicKitInterop.filterTrack(attributes, false, true)
|
||||
|
||||
|
@ -156,19 +156,19 @@ const MusicKitInterop = {
|
|||
// } catch (e) { }
|
||||
// if (MusicKit.getInstance().queue.nextPlayableItemIndex != -1 && MusicKit.getInstance().queue.nextPlayableItemIndex != null)
|
||||
// MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.nextPlayableItemIndex);
|
||||
MusicKit.getInstance().skipToNextItem().then(r => console.log(`[MusicKitInterop.next] Skipping to Next ${r}`));
|
||||
MusicKit.getInstance().skipToNextItem().then(r => console.debug(`[MusicKitInterop.next] Skipping to Next ${r}`));
|
||||
},
|
||||
|
||||
previous: () => {
|
||||
// if (MusicKit.getInstance().queue.previousPlayableItemIndex != -1 && MusicKit.getInstance().queue.previousPlayableItemIndex != null)
|
||||
// MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.previousPlayableItemIndex);
|
||||
MusicKit.getInstance().skipToPreviousItem().then(r => console.log(`[MusicKitInterop.previous] Skipping to Previous ${r}`));
|
||||
MusicKit.getInstance().skipToPreviousItem().then(r => console.debug(`[MusicKitInterop.previous] Skipping to Previous ${r}`));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
process.once('loaded', () => {
|
||||
console.log("Setting ipcRenderer")
|
||||
console.debug("Setting ipcRenderer")
|
||||
global.MusicKitInterop = MusicKitInterop;
|
||||
});
|
||||
|
|
|
@ -246,7 +246,7 @@ const app = new Vue({
|
|||
watch: {
|
||||
cfg: {
|
||||
handler: function (val, oldVal) {
|
||||
console.debug(`cfg changed from ${oldVal} to ${val}`);
|
||||
console.debug(`Config changed: ${JSON.stringify(val)}`);
|
||||
ipcRenderer.send("setStore", val);
|
||||
},
|
||||
deep: true
|
||||
|
@ -3903,19 +3903,15 @@ const app = new Vue({
|
|||
volumeUp() {
|
||||
if ((app.mk.volume + app.cfg.audio.volumeStep) > app.cfg.audio.maxVolume) {
|
||||
app.mk.volume = app.cfg.audio.maxVolume;
|
||||
console.debug('setting max volume')
|
||||
} else {
|
||||
console.log('volume up')
|
||||
app.mk.volume = ((app.mk.volume * 100) + (app.cfg.audio.volumeStep * 100)) / 100
|
||||
app.mk.volume = (Math.floor((app.mk.volume * 100)) + (app.cfg.audio.volumeStep * 100)) / 100
|
||||
}
|
||||
},
|
||||
volumeDown() {
|
||||
if ((app.mk.volume - app.cfg.audio.volumeStep) < 0) {
|
||||
app.mk.volume = 0;
|
||||
console.debug('setting volume to 0')
|
||||
} else {
|
||||
console.log('volume down')
|
||||
app.mk.volume = ((app.mk.volume * 100) - (app.cfg.audio.volumeStep * 100)) / 100
|
||||
app.mk.volume = (Math.floor((app.mk.volume * 100)) - (app.cfg.audio.volumeStep * 100)) / 100
|
||||
}
|
||||
},
|
||||
volumeWheel(event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue