Fix get branding by hash rong query

This commit is contained in:
Ajay 2023-09-09 19:07:50 -04:00
parent d08c423c6a
commit 65e7d24b7d

View file

@ -107,7 +107,7 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
const getSegments = () => db.prepare(
"all",
`SELECT "videoID", "startTime", "endTime", "videoDuration" FROM "sponsorTimes"
WHERE "votes" >= 0 AND "shadowHidden" = 0 AND "hidden" = 0 AND "actionType" = 'skip' AND "hashedVideoID" LIKE ? AND "service" = ?`,
WHERE "votes" > -2 AND "shadowHidden" = 0 AND "hidden" = 0 AND "actionType" = 'skip' AND "hashedVideoID" LIKE ? AND "service" = ?`,
[`${videoHashPrefix}%`, service],
{ useReplica: true }
) as Promise<BrandingSegmentHashDBResult[]>;