mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Force skip segments cache clear
This commit is contained in:
@@ -4,18 +4,18 @@ import { HashedValue } from "../types/hash.model";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export function skipSegmentsKey(videoID: VideoID, service: Service): string {
|
||||
return `segments.v2.${service}.videoID.${videoID}`;
|
||||
return `segments.v3.${service}.videoID.${videoID}`;
|
||||
}
|
||||
|
||||
export function skipSegmentGroupsKey(videoID: VideoID, service: Service): string {
|
||||
return `segments.groups.${service}.videoID.${videoID}`;
|
||||
return `segments.groups.v2.${service}.videoID.${videoID}`;
|
||||
}
|
||||
|
||||
export function skipSegmentsHashKey(hashedVideoIDPrefix: VideoIDHash, service: Service): string {
|
||||
hashedVideoIDPrefix = hashedVideoIDPrefix.substring(0, 4) as VideoIDHash;
|
||||
if (hashedVideoIDPrefix.length !== 4) Logger.warn(`Redis skip segment hash-prefix key is not length 4! ${hashedVideoIDPrefix}`);
|
||||
|
||||
return `segments.v2.${service}.${hashedVideoIDPrefix}`;
|
||||
return `segments.v3.${service}.${hashedVideoIDPrefix}`;
|
||||
}
|
||||
|
||||
export function reputationKey(userID: UserID): string {
|
||||
|
||||
Reference in New Issue
Block a user