mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Include action type in UUID
This commit is contained in:
@@ -519,7 +519,7 @@ export async function postSkipSegments(req: Request, res: Response): Promise<Res
|
||||
//this can just be a hash of the data
|
||||
//it's better than generating an actual UUID like what was used before
|
||||
//also better for duplication checking
|
||||
const UUID = getSubmissionUUID(videoID, segmentInfo.category, userID, parseFloat(segmentInfo.segment[0]), parseFloat(segmentInfo.segment[1]));
|
||||
const UUID = getSubmissionUUID(videoID, segmentInfo.category, segmentInfo.actionType, userID, parseFloat(segmentInfo.segment[0]), parseFloat(segmentInfo.segment[1]));
|
||||
const hashedVideoID = getHash(videoID, 1);
|
||||
|
||||
const startingLocked = isVIP ? 1 : 0;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import {getHash} from './getHash';
|
||||
import { HashedValue } from '../types/hash.model';
|
||||
import { ActionType, Category, VideoID } from '../types/segments.model';
|
||||
import { UserID } from '../types/user.model';
|
||||
|
||||
export function getSubmissionUUID(videoID: string, category: string, userID: string, startTime: number, endTime: number): HashedValue{
|
||||
return getHash('v2-categories' + videoID + startTime + endTime + category + userID, 1);
|
||||
export function getSubmissionUUID(videoID: VideoID, category: Category, actionType: ActionType, userID: UserID, startTime: number, endTime: number): HashedValue{
|
||||
return `3${getHash('v3' + videoID + startTime + endTime + category + userID, 1)}` as HashedValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user