simple fix

This commit is contained in:
Araxeus
2021-04-23 03:42:00 +03:00
parent 61e7124516
commit 650945418d

View File

@ -15,10 +15,13 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => {
const registerCallback = getSongInfo(win); const registerCallback = getSongInfo(win);
// If the page is ready, register the callback // If the page is ready, register the callback
win.on("ready-to-show", () => { win.once("ready-to-show", () => {
rpc.on("ready", () => { rpc.once("ready", () => {
// Register the callback // Register the callback
registerCallback((songInfo) => { registerCallback((songInfo) => {
if (songInfo.title.length === 0 && songInfo.artist.length === 0) {
return;
}
// Song information changed, so lets update the rich presence // Song information changed, so lets update the rich presence
const activityInfo = { const activityInfo = {
details: songInfo.title, details: songInfo.title,