reset video duration when vip upvotes hidden segment

This commit is contained in:
Ajay Ramachandran
2021-07-20 13:40:22 -04:00
parent 6171ba7c7a
commit 1ad805fda3
2 changed files with 8 additions and 4 deletions

View File

@@ -383,7 +383,8 @@ export async function postSkipSegments(req: Request, res: Response): Promise<Res
) as {videoDuration: VideoDuration, UUID: SegmentUUID}[];
// If the video's duration is changed, then the video should be unlocked and old submissions should be hidden
const videoDurationChanged = (videoDuration: number) => videoDuration != 0 && previousSubmissions.length > 0 && !previousSubmissions.some((e) => Math.abs(videoDuration - e.videoDuration) < 2);
const videoDurationChanged = (videoDuration: number) => videoDuration != 0
&& previousSubmissions.length > 0 && !previousSubmissions.some((e) => Math.abs(videoDuration - e.videoDuration) < 2);
let apiVideoInfo: APIVideoInfo = null;
if (service == Service.YouTube) {