From 3c4754a3a16939337bfeb90c375fbb9e0f7d91fb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Sep 2022 13:31:59 +0200 Subject: Wait transcoding by default when importing a video --- server/lib/video-import.ts | 2 +- server/tests/api/videos/video-channel-syncs.ts | 4 ++++ server/tests/api/videos/video-description.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/lib/video-import.ts b/server/lib/video-import.ts index d9da09040..796079875 100644 --- a/server/lib/video-import.ts +++ b/server/lib/video-import.ts @@ -115,7 +115,7 @@ async function buildVideoFromImport ({ channelId, importData, importDataOverride language: importDataOverride?.language || importData.language, commentsEnabled: importDataOverride?.commentsEnabled ?? CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED, downloadEnabled: importDataOverride?.downloadEnabled ?? CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED, - waitTranscoding: importDataOverride?.waitTranscoding || false, + waitTranscoding: importDataOverride?.waitTranscoding ?? true, state: VideoState.TO_IMPORT, nsfw: importDataOverride?.nsfw || importData.nsfw || false, description: importDataOverride?.description || importData.description, diff --git a/server/tests/api/videos/video-channel-syncs.ts b/server/tests/api/videos/video-channel-syncs.ts index 65b143a4f..5c0663311 100644 --- a/server/tests/api/videos/video-channel-syncs.ts +++ b/server/tests/api/videos/video-channel-syncs.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ + import { expect } from 'chai' import { FIXTURE_URLS } from '@server/tests/shared' import { areHttpImportTestsDisabled } from '@shared/core-utils' @@ -76,6 +78,7 @@ describe('Test channel synchronizations', function () { }) expect(video.name).to.equal('small video - youtube') + expect(video.waitTranscoding).to.be.true const { total } = await servers[0].videos.listByChannel({ handle: 'root_channel', include: VideoInclude.NOT_PUBLISHED_STATE }) expect(total).to.equal(1) @@ -109,6 +112,7 @@ describe('Test channel synchronizations', function () { }) expect(total).to.equal(2) expect(data[0].name).to.equal('test') + expect(data[0].waitTranscoding).to.be.true } }) diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts index a74b78a5f..a4b3ff6e7 100644 --- a/server/tests/api/videos/video-description.ts +++ b/server/tests/api/videos/video-description.ts @@ -30,7 +30,7 @@ describe('Test video description', function () { }) it('Should upload video with long description', async function () { - this.timeout(10000) + this.timeout(30000) const attributes = { description: longDescription -- cgit v1.2.3