mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Use longer hash prefix when fetching segments to save bandwidth
This commit is contained in:
@@ -49,7 +49,7 @@ async function fetchSegmentsForVideo(videoID: VideoID): Promise<SegmentResponse>
|
|||||||
const hashParams = getHashParams();
|
const hashParams = getHashParams();
|
||||||
if (hashParams.requiredSegment) extraRequestData.requiredSegment = hashParams.requiredSegment;
|
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 hasDownvotedSegments = !!Config.local.downvotedSegments[hashPrefix];
|
||||||
const response = await asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, {
|
const response = await asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, {
|
||||||
categories: CompileConfig.categoryList,
|
categories: CompileConfig.categoryList,
|
||||||
|
|||||||
Reference in New Issue
Block a user