From e77a32de6eead3f143a2bab8c375aafbd83ca615 Mon Sep 17 00:00:00 2001 From: HanYaodong Date: Fri, 28 Jun 2024 16:10:02 +0800 Subject: [PATCH] Add parse bvID from window --- maze-utils | 2 +- src/utils/thumbnails.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maze-utils b/maze-utils index 4b4180cc..b54f55b7 160000 --- a/maze-utils +++ b/maze-utils @@ -1 +1 @@ -Subproject commit 4b4180cce8eb87f40cff04eb32de4cea2913be2c +Subproject commit b54f55b7639aa475f29cf57628cc95aaa660b657 diff --git a/src/utils/thumbnails.ts b/src/utils/thumbnails.ts index 337ac10a..7428692f 100644 --- a/src/utils/thumbnails.ts +++ b/src/utils/thumbnails.ts @@ -1,4 +1,4 @@ -import { parseBilibiliVideoIDFromURL } from "../../maze-utils/src/video"; +import { getBvIDFromURL } from "../../maze-utils/src/video"; import Config from "../config"; import { getVideoLabel } from "./videoLabels"; import { setThumbnailListener } from "../../maze-utils/src/thumbnailManagement"; @@ -17,7 +17,7 @@ export async function labelThumbnail(thumbnail: HTMLImageElement): Promise; const videoIDs = new Set(links.filter((link) => link && link.href) - .map((link) => parseBilibiliVideoIDFromURL(link.href)?.videoID) + .map((link) => getBvIDFromURL(link.href)) .filter((id) => id)); if (videoIDs.size !== 1) { // none or multiple video IDs found