Skip to content

Commit

Permalink
fix(Netflix): resolve pause and showsmallimages issues (#9049)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
iuriineves authored Jan 3, 2025
1 parent 2925915 commit 6f85a65
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion websites/N/Netflix/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
38 changes: 19 additions & 19 deletions websites/N/Netflix/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
}),
Expand Down

0 comments on commit 6f85a65

Please sign in to comment.