Skip to content

Commit

Permalink
Metadata: call getImage in front
Browse files Browse the repository at this point in the history
  • Loading branch information
th-ch committed Apr 3, 2021
1 parent fecb193 commit 533b8a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/song-info-front.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const { ipcRenderer } = require("electron");

const { getImage } = require("./song-info");

global.songInfo = {};

ipcRenderer.on("update-song-info", (_, extractedSongInfo) => {
ipcRenderer.on("update-song-info", async (_, extractedSongInfo) => {
global.songInfo = JSON.parse(extractedSongInfo);
global.songInfo.image = await getImage(global.songInfo.imageSrc);
});

const injectListener = () => {
Expand Down
1 change: 1 addition & 0 deletions providers/song-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ const registerProvider = (win) => {
};

module.exports = registerProvider;
module.exports.getImage = getImage;

0 comments on commit 533b8a8

Please sign in to comment.