mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 08:26:59 +03:00
Temp vip fix
This commit is contained in:
@@ -63,7 +63,7 @@ const isUserTempVIP = async (nonAnonUserID: HashedUserID, videoID: VideoID): Pro
|
|||||||
const apiVideoInfo = await getYouTubeVideoInfo(videoID);
|
const apiVideoInfo = await getYouTubeVideoInfo(videoID);
|
||||||
const channelID = apiVideoInfo?.data?.authorId;
|
const channelID = apiVideoInfo?.data?.authorId;
|
||||||
const { err, reply } = await redis.getAsync(tempVIPKey(nonAnonUserID));
|
const { err, reply } = await redis.getAsync(tempVIPKey(nonAnonUserID));
|
||||||
return err ? false : (reply == channelID);
|
return err || !reply ? false : (reply == channelID);
|
||||||
};
|
};
|
||||||
|
|
||||||
const videoDurationChanged = (segmentDuration: number, APIDuration: number) => (APIDuration > 0 && Math.abs(segmentDuration - APIDuration) > 2);
|
const videoDurationChanged = (segmentDuration: number, APIDuration: number) => (APIDuration > 0 && Math.abs(segmentDuration - APIDuration) > 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user