From 7444c482e4beff995c415a09e54a1c4bd272a842 Mon Sep 17 00:00:00 2001 From: armup31 Date: Wed, 20 Nov 2024 18:43:27 +0530 Subject: [PATCH] A lil fix --- websites/P/Physics Wallah/presence.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/websites/P/Physics Wallah/presence.ts b/websites/P/Physics Wallah/presence.ts index 2068fa807461..dda9a0b8b99d 100644 --- a/websites/P/Physics Wallah/presence.ts +++ b/websites/P/Physics Wallah/presence.ts @@ -106,7 +106,8 @@ presence.on("UpdateData", async () => { presenceData.smallImageText = "Viewing DPP"; } } else if (pathname.startsWith("/watch")) { - const deta = JSON.parse(localStorage.getItem("SCHEDULE_DETAILS")).tags[0]; + const deta = JSON.parse(localStorage.getItem("SCHEDULE_DETAILS")).subject + .name; let detal = ` | ${deta}`; if (deta === null) detal = ""; if (!privacyMode) { @@ -117,8 +118,10 @@ presence.on("UpdateData", async () => { }`; presenceData.buttons = [{ label: "Watch Lecture", url: fullurl }]; - } else presenceData.details = `Watching a lecture${detal}`; - + } else { + presenceData.details = "Watching a lecture"; + presenceData.state = `Subject: ${deta}`; + } if (document.querySelectorAll(".vjs-paused").length < 1) { presenceData.smallImageKey = Assets.Play; presenceData.smallImageText = "Watching a lecture";