Browse Source

Set windows thumbnail image as album image

master
jeffvli 3 years ago
committed by Jeff
parent
commit
adaa0c0a6b
  1. 27
      src/main.dev.js

27
src/main.dev.js

@ -148,6 +148,16 @@ const createWindow = async () => {
}
};
const getCurrentTrackName = () => {
const storeValues = store.getState();
const currentEntryList = storeValues.playQueue.shuffle ? 'shuffledEntry' : 'entry';
if (storeValues.playQueue[currentEntryList].length > 0) {
return storeValues.playQueue.current.name;
}
return 'sonixd';
};
if (settings.getSync('globalMediaHotkeys')) {
globalShortcut.register('MediaStop', () => {
stop();
@ -214,10 +224,27 @@ const createWindow = async () => {
click: () => nextTrack(),
},
]);
mainWindow.setThumbnailClip({
x: 15,
y: mainWindow.getContentSize()[1] - 83,
height: 65,
width: 65,
});
}
}
});
mainWindow.on('resize', () => {
// Set the current song image as thumbnail
mainWindow.setThumbnailClip({
x: 15,
y: mainWindow.getContentSize()[1] - 83,
height: 65,
width: 65,
});
});
mainWindow.on('closed', () => {
mainWindow = null;
});

Loading…
Cancel
Save