Skip to content

Commit

Permalink
fix(Emby): fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
darkvillager2 committed Oct 15, 2024
1 parent 796b360 commit 44a5619
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion websites/E/Emby/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ async function handleVideoPlayback(): Promise<void> {
?.backgroundImage
) ||
/\/[0-9]+\//.exec(
document.querySelector<HTMLVideoElement>(".htmlVideoPlayerContainer")?.src
document.querySelector<HTMLVideoElement>(".htmlVideoPlayer")?.src
);

if (!regexResult) {
Expand Down Expand Up @@ -663,6 +663,8 @@ async function handleItemDetails(): Promise<void> {
const data = await obtainMediaInfo(
new URLSearchParams(location.hash.split("?")[1]).get("id")
);
delete presenceData.startTimestamp;
delete presenceData.endTimestamp;

if (!data) {
presenceData.details = "Browsing details of an item";
Expand Down Expand Up @@ -718,6 +720,7 @@ async function handleWebClient(): Promise<void> {
if (
audioElement &&
audioElement.classList.contains("mediaPlayerAudio") &&
document.querySelector(".nowPlayingBarInfoContainer") &&
audioElement.src
) {
await handleAudioPlayback();
Expand Down

0 comments on commit 44a5619

Please sign in to comment.