Skip to content

Commit 705f7d6

Browse files
committed
feat: fix music-medata
1 parent a51cd24 commit 705f7d6

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

libraries/nestjs-libraries/src/openai/fal.service.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import { Injectable } from '@nestjs/common';
22

3-
let limit: any;
4-
5-
(async () => {
6-
const pLimit = await import('p-limit');
7-
limit = pLimit.default(10);
8-
})();
3+
import pLimit from 'p-limit';
4+
const limit = pLimit(10);
95

106
@Injectable()
117
export class FalService {

libraries/nestjs-libraries/src/videos/images-slides/images.slides.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import { chunk } from 'lodash';
99
import Transloadit from 'transloadit';
1010
import { UploadFactory } from '@gitroom/nestjs-libraries/upload/upload.factory';
1111
import { Readable } from 'stream';
12-
import { parseBuffer } from 'music-metadata';
1312
import { stringifySync } from 'subtitle';
14-
import { FalService } from '@gitroom/nestjs-libraries/openai/fal.service';
1513

16-
let limit: any;
14+
import pLimit from 'p-limit';
15+
import { FalService } from '@gitroom/nestjs-libraries/openai/fal.service';
16+
const limit = pLimit(2);
1717

18+
let parseBuffer: any;
1819
(async () => {
19-
const pLimit = await import('p-limit');
20-
limit = pLimit.default(2);
20+
parseBuffer = (await import('music-metadata')).parseBuffer;
2121
})();
2222

2323
const transloadit = new Transloadit({

0 commit comments

Comments
 (0)