mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
Metadata: call getImage in front
This commit is contained in:
@ -1,9 +1,12 @@
|
|||||||
const { ipcRenderer } = require("electron");
|
const { ipcRenderer } = require("electron");
|
||||||
|
|
||||||
|
const { getImage } = require("./song-info");
|
||||||
|
|
||||||
global.songInfo = {};
|
global.songInfo = {};
|
||||||
|
|
||||||
ipcRenderer.on("update-song-info", (_, extractedSongInfo) => {
|
ipcRenderer.on("update-song-info", async (_, extractedSongInfo) => {
|
||||||
global.songInfo = JSON.parse(extractedSongInfo);
|
global.songInfo = JSON.parse(extractedSongInfo);
|
||||||
|
global.songInfo.image = await getImage(global.songInfo.imageSrc);
|
||||||
});
|
});
|
||||||
|
|
||||||
const injectListener = () => {
|
const injectListener = () => {
|
||||||
|
|||||||
@ -90,3 +90,4 @@ const registerProvider = (win) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = registerProvider;
|
module.exports = registerProvider;
|
||||||
|
module.exports.getImage = getImage;
|
||||||
|
|||||||
Reference in New Issue
Block a user