From b05d6960573b6abbb8b68e354b17f279289a63ad Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 12 Mar 2025 02:51:07 -0400 Subject: [PATCH] Use longer hash prefix when fetching segments to save bandwidth --- src/utils/segmentData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/segmentData.ts b/src/utils/segmentData.ts index 5741730d..c79562c3 100644 --- a/src/utils/segmentData.ts +++ b/src/utils/segmentData.ts @@ -49,7 +49,7 @@ async function fetchSegmentsForVideo(videoID: VideoID): Promise const hashParams = getHashParams(); if (hashParams.requiredSegment) extraRequestData.requiredSegment = hashParams.requiredSegment; - const hashPrefix = (await getHash(videoID, 1)).slice(0, 4) as VideoID & HashedValue; + const hashPrefix = (await getHash(videoID, 1)).slice(0, 5) as VideoID & HashedValue; const hasDownvotedSegments = !!Config.local.downvotedSegments[hashPrefix]; const response = await asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, { categories: CompileConfig.categoryList,