Don't group different categories

This commit is contained in:
Ajay
2022-01-04 20:39:50 -05:00
parent 7f7cc3a7ca
commit 6a98a215ac
3 changed files with 22 additions and 22 deletions

View File

@@ -307,8 +307,6 @@ function splitPercentOverlap(groups: OverlappingSegmentGroup[]): OverlappingSegm
const overlapPercent = overlap / overallDuration;
return (overlapPercent >= 0.1 && segment.actionType === compareSegment.actionType && segment.category === compareSegment.category && segment.actionType !== ActionType.Chapter)
|| (overlapPercent >= 0.6 && segment.actionType !== compareSegment.actionType && segment.category === compareSegment.category)
|| (overlapPercent >= 0.95 && segment.actionType === compareSegment.actionType && segment.category !== compareSegment.category
&& segment.category !== "music_offtopic" && compareSegment.category !== "music_offtopic")
|| (overlapPercent >= 0.8 && segment.actionType === ActionType.Chapter && compareSegment.actionType === ActionType.Chapter);
});
});

View File

@@ -4,16 +4,16 @@ import { HashedValue } from "../types/hash.model";
import { Logger } from "./logger";
export const skipSegmentsKey = (videoID: VideoID, service: Service): string =>
`segments.v3.${service}.videoID.${videoID}`;
`segments.v4.${service}.videoID.${videoID}`;
export const skipSegmentGroupsKey = (videoID: VideoID, service: Service): string =>
`segments.groups.v2.${service}.videoID.${videoID}`;
`segments.groups.v3.${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.v3.${service}.${hashedVideoIDPrefix}`;
return `segments.v4.${service}.${hashedVideoIDPrefix}`;
}
export const reputationKey = (userID: UserID): string =>