mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-18 21:52:05 +00:00
simple fix
This commit is contained in:
@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user