diff --git a/maze-utils b/maze-utils index 9cef8e27..5d5e0b09 160000 --- a/maze-utils +++ b/maze-utils @@ -1 +1 @@ -Subproject commit 9cef8e27cdc61acbb7b00db5a782106637ddcdbc +Subproject commit 5d5e0b096b67f138122d0c6142505210bfe52120 diff --git a/src/content.ts b/src/content.ts index 9682dbfe..83e80dd0 100644 --- a/src/content.ts +++ b/src/content.ts @@ -33,7 +33,7 @@ import { logDebug, logWarn } from "./utils/logger"; import { importTimes } from "./utils/exporter"; import { ChapterVote } from "./render/ChapterVote"; import { openWarningDialog } from "./utils/warnings"; -import { isFirefoxOrSafari, waitFor } from "../maze-utils/src"; +import { extensionUserAgent, isFirefoxOrSafari, waitFor } from "../maze-utils/src"; import { getErrorMessage, getFormattedTime } from "../maze-utils/src/formating"; import { getChannelIDInfo, getVideo, getIsAdPlaying, getIsLivePremiere, setIsAdPlaying, checkVideoIDChange, getVideoID, getYouTubeVideoID, setupVideoModule, checkIfNewVideoID, isOnInvidious, isOnMobileYouTube, isOnYouTubeMusic, isOnYTTV, getLastNonInlineVideoID, triggerVideoIDChange, triggerVideoElementChange, getIsInline, getCurrentTime, setCurrentTime, getVideoDuration, verifyCurrentTime, waitForVideo } from "../maze-utils/src/video"; import { Keybind, StorageChangesObject, isSafari, keybindEquals, keybindToString } from "../maze-utils/src/config"; @@ -2470,7 +2470,7 @@ async function sendSubmitMessage(): Promise { userID: Config.config.userID, segments: sponsorTimesSubmitting, videoDuration: getVideoDuration(), - userAgent: `${chrome.runtime.id}/v${chrome.runtime.getManifest().version}` + userAgent: extensionUserAgent(), }); if (response.status === 200) { diff --git a/src/utils/segmentData.ts b/src/utils/segmentData.ts index 69820c08..d9273e7b 100644 --- a/src/utils/segmentData.ts +++ b/src/utils/segmentData.ts @@ -5,6 +5,7 @@ import * as CompileConfig from "../../config.json"; import { ActionType, ActionTypes, SponsorSourceType, SponsorTime, VideoID } from "../types"; import { getHashParams } from "./pageUtils"; import { asyncRequestToServer } from "./requests"; +import { extensionUserAgent } from "../../maze-utils/src"; const segmentDataCache = new DataCache(() => { return { @@ -57,7 +58,7 @@ async function fetchSegmentsForVideo(videoID: VideoID): Promise trimUUIDs: hasDownvotedSegments ? null : 5, ...extraRequestData }, { - "X-CLIENT-NAME": `${chrome.runtime.id}/v${chrome.runtime.getManifest().version}` + "X-CLIENT-NAME": extensionUserAgent(), }); if (response.ok) { @@ -103,4 +104,4 @@ function getEnabledActionTypes(forceFullVideo = false): ActionType[] { } return actionTypes; -} \ No newline at end of file +}