mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-05-11 10:26:25 +02:00
Don't think duration changed when API fails
This commit is contained in:
parent
2453c45b06
commit
c1609a826a
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ export async function postSkipSegments(req: Request, res: Response) {
|
|||
AND "shadowHidden" = 0 AND "votes" >= 0 AND "videoDuration" != 0`, [videoID, service]) 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) => 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue