From d229003f6e61d5ef1cb882ed73483bc1c8fbff04 Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Sat, 8 Oct 2022 09:08:40 +0200 Subject: [PATCH] Unlock the video on duration change detected when voting --- src/routes/voteOnSponsorTime.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index bba06fb..1f8c619 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -14,6 +14,7 @@ import { DBSegment, Category, HashedIP, IPAddress, SegmentUUID, Service, VideoID import { QueryCacher } from "../utils/queryCacher"; import axios from "axios"; import { getVideoDetails, videoDetails } from "../utils/getVideoDetails"; +import { deleteLockCategories } from "./deleteLockCategories"; const voteTypes = { normal: 0, @@ -95,6 +96,7 @@ async function checkVideoDuration(UUID: SegmentUUID) { AND "hidden" = 0 AND "shadowHidden" = 0 AND "actionType" != 'full' AND "votes" > -2`, [videoID, service, latestSubmission.timeSubmitted]); + deleteLockCategories(videoID, null, null, service).catch(Logger.error); } }