Skip to content

Commit

Permalink
Add check against missing api video detail failing to fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Nov 7, 2024
1 parent 01c3062 commit 405805f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/postSkipSegments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async function checkEachSegmentValid(rawIP: IPAddress, paramUserID: UserID, user

async function checkByAutoModerator(videoID: VideoID, userID: HashedUserID, segments: IncomingSegment[], service: Service, apiVideoDetails: videoDetails, videoDuration: number): Promise<CheckResult> {
// Auto moderator check
if (service == Service.YouTube) {
if (service == Service.YouTube && apiVideoDetails) {
const autoModerateResult = await autoModerateSubmission(apiVideoDetails, { videoID, userID, segments, service, videoDuration });
if (autoModerateResult) {
return {
Expand Down

0 comments on commit 405805f

Please sign in to comment.