Skip to content

Commit b05d696

Browse files
committed
Use longer hash prefix when fetching segments to save bandwidth
1 parent d8ddcdc commit b05d696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/segmentData.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function fetchSegmentsForVideo(videoID: VideoID): Promise<SegmentResponse>
4949
const hashParams = getHashParams();
5050
if (hashParams.requiredSegment) extraRequestData.requiredSegment = hashParams.requiredSegment;
5151

52-
const hashPrefix = (await getHash(videoID, 1)).slice(0, 4) as VideoID & HashedValue;
52+
const hashPrefix = (await getHash(videoID, 1)).slice(0, 5) as VideoID & HashedValue;
5353
const hasDownvotedSegments = !!Config.local.downvotedSegments[hashPrefix];
5454
const response = await asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, {
5555
categories: CompileConfig.categoryList,

0 commit comments

Comments
 (0)