From b06583afce1967a71a0b70c30f170ed0f0d92a6f Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 28 Mar 2021 21:16:33 +0200 Subject: [PATCH] Bundle imports + prettier --- providers/song-info.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/providers/song-info.js b/providers/song-info.js index 5bea89b8..075f095e 100644 --- a/providers/song-info.js +++ b/providers/song-info.js @@ -1,12 +1,10 @@ -const { ipcMain } = require("electron"); -const { nativeImage } = require("electron"); +const { ipcMain, nativeImage } = require("electron"); const fetch = require("node-fetch"); // This selects the progress bar, used for current progress const progressSelector = "#progress-bar"; - // Grab the progress using the selector const getProgress = async (win) => { // Get current value of the progressbar element @@ -52,7 +50,7 @@ const handleData = async (_event, responseText) => { songInfo.songDuration = data?.videoDetails?.lengthSeconds; songInfo.image = await getImage(songInfo.imageSrc); songInfo.uploadDate = data?.microformat?.microformatDataRenderer?.uploadDate; -} +}; const registerProvider = (win) => { // This variable will be filled with the callbacks once they register @@ -77,7 +75,7 @@ const registerProvider = (win) => { }); // This will be called when the song-info-front finds a new request with song data - ipcMain.on('song-info-request', handleData); + ipcMain.on("song-info-request", handleData); return registerCallback; };