From aac2edf1b9692d9d6b3d4a55a5515299cbc120ee Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Sun, 12 Nov 2023 12:28:44 -0500 Subject: [PATCH 1/2] fix: video history ran on live video --- src/features/videoHistory/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/features/videoHistory/index.ts b/src/features/videoHistory/index.ts index da75c7d7..a478f395 100644 --- a/src/features/videoHistory/index.ts +++ b/src/features/videoHistory/index.ts @@ -16,6 +16,9 @@ export async function setupVideoHistory() { const playerContainer = isWatchPage() ? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null) : isShortsPage() ? null : null; // If player container is not available, return if (!playerContainer) return; + const playerVideoData = await playerContainer.getVideoData(); + // If the video is live return + if (playerVideoData.isLive) return; const { video_id: videoId } = await playerContainer.getVideoData(); if (!videoId) return; const videoElement = document.querySelector("video.video-stream.html5-main-video") as HTMLVideoElement | null; From 5ab5c9b52a08d0b6840be8c58d83c6a5b493718f Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Sun, 12 Nov 2023 12:30:04 -0500 Subject: [PATCH 2/2] build: fix nodemon exec script --- nodemon.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodemon.json b/nodemon.json index 85892546..78a76f2e 100644 --- a/nodemon.json +++ b/nodemon.json @@ -5,5 +5,5 @@ "watch": ["src", "utils", "vite.config.ts", "public", "public/locales"], "ext": "ts,tsx,css,html,json", "ignore": ["src/**/*.spec.ts", "public/locales/en-US.json.d.ts"], - "exec": "concurrently \"vite build\" -- \"ts-json-as-const public/locales/en-US.json\" -- \"prettier --write public/locales/en-US.json.d.ts\"" + "exec": "concurrently \"vite build\" \"ts-json-as-const public/locales/en-US.json\" \"prettier --write public/locales/en-US.json.d.ts\"" }