Skip to content

Commit d70fd6a

Browse files
committed
Bump ffprobe types with my upstream fix
1 parent e027fd3 commit d70fd6a

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"@types/cookie-parser": "^1.4.3",
107107
"@types/express": "^4.17.17",
108108
"@types/express-serve-static-core": "^4.17.35",
109-
"@types/ffprobe": "^1.1.4",
109+
"@types/ffprobe": "^1.1.5",
110110
"@types/jest": "^29.5.3",
111111
"@types/jsonwebtoken": "^9.0.2",
112112
"@types/lodash": "^4.14.197",

src/components/file/media/media-detector.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ export class MediaDetector {
5353
const result = await this.ffprobe(url);
5454
const { width, height, duration: rawDuration } = result.streams?.[0] ?? {};
5555

56-
const d = rawDuration as string | number | undefined; // I've seen as string
57-
const duration = !d ? 0 : typeof d === 'string' ? parseFloat(d) : d;
56+
const duration = rawDuration ? parseFloat(rawDuration) : 0;
5857

5958
if (isAudio) {
6059
return { __typename: 'Audio', duration };

yarn.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)