From b93af8984efb11318b041ba2d2b394ca1dddcd31 Mon Sep 17 00:00:00 2001 From: Thom Shutt Date: Thu, 7 Nov 2024 12:50:33 +0000 Subject: [PATCH] Put hack in place for StreamETH to do 20 concurrent clips instead of 5 --- packages/api/src/controllers/clip.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/api/src/controllers/clip.ts b/packages/api/src/controllers/clip.ts index 98b2e305c..7c704b0e4 100644 --- a/packages/api/src/controllers/clip.ts +++ b/packages/api/src/controllers/clip.ts @@ -121,7 +121,13 @@ app.post( 5, ); - if (processingClips.length >= MAX_PROCESSING_CLIPS && !clippingUser.admin) { + // Hack to let StreamETH have a higher clipping limit without having to do the work to put this on the User object + let maxProcessingClips = MAX_PROCESSING_CLIPS; + if (req.user.id == "05f04681-b600-4a9b-81ea-1f56e7871f04") { + maxProcessingClips = 20; + } + + if (processingClips.length >= maxProcessingClips && !clippingUser.admin) { throw new ForbiddenError("Too many clips are being processed."); }