mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-25 08:58:23 +03:00
16 lines
509 B
TypeScript
16 lines
509 B
TypeScript
import { getHash } from "./getHash";
|
|
import { HashedValue } from "../types/hash.model";
|
|
import { ActionType, VideoID, Service } from "../types/segments.model";
|
|
import { UserID } from "../types/user.model";
|
|
|
|
export function getSubmissionUUID(
|
|
videoID: VideoID,
|
|
actionType: ActionType,
|
|
userID: UserID,
|
|
startTime: number,
|
|
endTime: number,
|
|
service: Service
|
|
) : HashedValue {
|
|
return `5${getHash(`${videoID}${startTime}${endTime}${userID}${actionType}${service}`, 1)}` as HashedValue;
|
|
}
|