Skip to content

Commit

Permalink
Fix maxDownloadSpeed not throttling
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Jun 20, 2024
1 parent 2eb119e commit 6560ff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class Video extends Attachment {
const writeStream = createWriteStream(this.partialPath);

// Throttle if enabled
if (Video.ThrottleGroup) downloadRequest.pipe(Video.ThrottleGroup.throttle(Video.ThrottleOptions).pipe(writeStream));
if (Video.ThrottleGroup) downloadRequest.pipe(Video.ThrottleGroup.throttle(<any>undefined).pipe(writeStream));

Check failure on line 111 in src/lib/Video.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] src/lib/Video.ts#L111 <@typescript-eslint/no-explicit-any>(https://typescript-eslint.io/rules/no-explicit-any)

Unexpected any. Specify a different type.
Raw output
{"ruleId":"@typescript-eslint/no-explicit-any","severity":2,"message":"Unexpected any. Specify a different type.","line":111,"column":83,"nodeType":"TSAnyKeyword","messageId":"unexpectedAny","endLine":111,"endColumn":86,"suggestions":[{"messageId":"suggestUnknown","fix":{"range":[3630,3633],"text":"unknown"},"desc":"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct."},{"messageId":"suggestNever","fix":{"range":[3630,3633],"text":"never"},"desc":"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of."}]}
else downloadRequest.pipe(writeStream);

let downloadedBytes = 0;
Expand Down

0 comments on commit 6560ff7

Please sign in to comment.