setup SongInfo **once**

This commit is contained in:
Araxeus
2021-05-10 04:15:56 +03:00
parent 7942efa202
commit 7cf78c6635
8 changed files with 20 additions and 26 deletions

View File

@ -1,6 +1,6 @@
const Discord = require("discord-rpc");
const getSongInfo = require("../../providers/song-info");
const registerCallback = require("../../providers/song-info");
const rpc = new Discord.Client({
transport: "ipc",
@ -12,8 +12,6 @@ const clientId = "790655993809338398";
let clearActivity;
module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => {
const registerCallback = getSongInfo(win);
// If the page is ready, register the callback
win.once("ready-to-show", () => {
rpc.once("ready", () => {