mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-27 18:08:23 +03:00
Fix video labels keys not clearing properly
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { NextFunction, Request, Response } from "express";
|
||||
import { VideoID, VideoIDHash, Service } from "../types/segments.model";
|
||||
import { QueryCacher } from "../utils/queryCacher";
|
||||
import { brandingHashKey, brandingKey, skipSegmentsHashKey, skipSegmentsKey, videoLabelsHashKey, videoLabelsKey } from "../utils/redisKeys";
|
||||
import { brandingHashKey, brandingKey, skipSegmentsHashKey, skipSegmentsKey, videoLabelsHashKey, videoLabelsKey, videoLabelsLargerHashKey } from "../utils/redisKeys";
|
||||
|
||||
type hashType = "skipSegments" | "skipSegmentsHash" | "videoLabel" | "videoLabelHash" | "branding" | "brandingHash";
|
||||
type hashType = "skipSegments" | "skipSegmentsHash" | "videoLabel" | "videoLabelHash" | "videoLabelsLargerHash" | "branding" | "brandingHash";
|
||||
type ETag = `"${hashType};${VideoIDHash};${Service};${number}"`;
|
||||
type hashKey = string | VideoID | VideoIDHash;
|
||||
|
||||
@@ -32,6 +32,7 @@ function getLastModified(hashType: hashType, hashKey: hashKey, service: Service)
|
||||
else if (hashType === "skipSegmentsHash") redisKey = skipSegmentsHashKey(hashKey as VideoIDHash, service);
|
||||
else if (hashType === "videoLabel") redisKey = videoLabelsKey(hashKey as VideoID, service);
|
||||
else if (hashType === "videoLabelHash") redisKey = videoLabelsHashKey(hashKey as VideoIDHash, service);
|
||||
else if (hashType === "videoLabelsLargerHash") redisKey = videoLabelsLargerHashKey(hashKey as VideoIDHash, service);
|
||||
else if (hashType === "branding") redisKey = brandingKey(hashKey as VideoID, service);
|
||||
else if (hashType === "brandingHash") redisKey = brandingHashKey(hashKey as VideoIDHash, service);
|
||||
else return Promise.reject();
|
||||
|
||||
Reference in New Issue
Block a user