From 6f85a6559db687b099e18409fcad290da01b7bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=BAri=20Neves?= <60155360+iuriineves@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:07:01 +0000 Subject: [PATCH] fix(Netflix): resolve pause and showsmallimages issues (#9049) * fix(Netflix): pause and showsmallimages issues - Fixed issue where pausing would not update the presence status correctly - setting the timestamp to null broke the presence - Resolved problem with small images not displaying properly - setting the image url to "" wouldn't update the image Closes #9031 * chore(Netflix): version bump to 6.1.2 --- websites/N/Netflix/metadata.json | 2 +- websites/N/Netflix/presence.ts | 38 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/websites/N/Netflix/metadata.json b/websites/N/Netflix/metadata.json index 1317514478f7..67c44ed099aa 100644 --- a/websites/N/Netflix/metadata.json +++ b/websites/N/Netflix/metadata.json @@ -56,7 +56,7 @@ "www.netflix.com", "netflix.com" ], - "version": "6.1.1", + "version": "6.1.2", "logo": "https://cdn.rcd.gg/PreMiD/websites/N/Netflix/assets/logo.png", "thumbnail": "https://cdn.rcd.gg/PreMiD/websites/N/Netflix/assets/thumbnail.jpg", "color": "#db0000", diff --git a/websites/N/Netflix/presence.ts b/websites/N/Netflix/presence.ts index 0744b91b4dfe..8c030accab62 100644 --- a/websites/N/Netflix/presence.ts +++ b/websites/N/Netflix/presence.ts @@ -84,7 +84,9 @@ presence.on("UpdateData", async () => { ? [LargImages.Animated, LargImages.Logo, LargImages.Noback][logoType] || LargImages.Logo : metadata.data.video.boxart.at(0).url, - smallImageKey: showSmallImages ? Assets.Reading : "", + ...(showSmallImages && { + smallImageKey: Assets.Reading, + }), smallImageText: strings.browse, buttons: [ { @@ -139,16 +141,15 @@ presence.on("UpdateData", async () => { logoType ] || LargImages.Logo : metadata.data.video.boxart.at(0).url, - smallImageKey: showSmallImages - ? paused - ? Assets.Pause - : Assets.Play - : "", - smallImageText: paused ? strings.pause : strings.play, - ...(showTimestamp && { - startTimestamp: paused ? null : startTimestamp, - endTimestamp: paused ? null : endTimestamp, + ...(showSmallImages && { + smallImageKey: paused ? Assets.Pause : Assets.Play, }), + smallImageText: paused ? strings.pause : strings.play, + ...(showTimestamp && + !paused && { + startTimestamp, + endTimestamp, + }), ...(usePresenceName && { name: metadata.data.video.title, details: episode.title, @@ -192,16 +193,15 @@ presence.on("UpdateData", async () => { logoType ] || LargImages.Logo : metadata.data.video.boxart.at(0).url, - smallImageKey: showSmallImages - ? paused - ? Assets.Pause - : Assets.Play - : "", - smallImageText: paused ? strings.pause : strings.play, - ...(showTimestamp && { - startTimestamp: paused ? null : startTimestamp, - endTimestamp: paused ? null : endTimestamp, + ...(showSmallImages && { + smallImageKey: paused ? Assets.Pause : Assets.Play, }), + smallImageText: paused ? strings.pause : strings.play, + ...(showTimestamp && + !paused && { + startTimestamp, + endTimestamp, + }), ...(usePresenceName && { name: metadata.data.video.title, }),