diff options
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 98a568a02..a3a276188 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -4,10 +4,11 @@ import { expect } from 'chai' | |||
4 | import { createReadStream, pathExists, readdir, readFile, stat } from 'fs-extra' | 4 | import { createReadStream, pathExists, readdir, readFile, stat } from 'fs-extra' |
5 | import got, { Response as GotResponse } from 'got/dist/source' | 5 | import got, { Response as GotResponse } from 'got/dist/source' |
6 | import * as parseTorrent from 'parse-torrent' | 6 | import * as parseTorrent from 'parse-torrent' |
7 | import { extname, join } from 'path' | 7 | import { join } from 'path' |
8 | import * as request from 'supertest' | 8 | import * as request from 'supertest' |
9 | import { v4 as uuidv4 } from 'uuid' | 9 | import { v4 as uuidv4 } from 'uuid' |
10 | import validator from 'validator' | 10 | import validator from 'validator' |
11 | import { getLowercaseExtension } from '@server/helpers/core-utils' | ||
11 | import { HttpStatusCode } from '@shared/core-utils' | 12 | import { HttpStatusCode } from '@shared/core-utils' |
12 | import { VideosCommonQuery } from '@shared/models' | 13 | import { VideosCommonQuery } from '@shared/models' |
13 | import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' | 14 | import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' |
@@ -738,7 +739,7 @@ async function completeVideoCheck ( | |||
738 | const file = videoDetails.files.find(f => f.resolution.id === attributeFile.resolution) | 739 | const file = videoDetails.files.find(f => f.resolution.id === attributeFile.resolution) |
739 | expect(file).not.to.be.undefined | 740 | expect(file).not.to.be.undefined |
740 | 741 | ||
741 | let extension = extname(attributes.fixture) | 742 | let extension = getLowercaseExtension(attributes.fixture) |
742 | // Transcoding enabled: extension will always be .mp4 | 743 | // Transcoding enabled: extension will always be .mp4 |
743 | if (attributes.files.length > 1) extension = '.mp4' | 744 | if (attributes.files.length > 1) extension = '.mp4' |
744 | 745 | ||