diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-16 13:31:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-16 13:48:06 +0200 |
commit | 3c4754a3a16939337bfeb90c375fbb9e0f7d91fb (patch) | |
tree | 92991013bc8250135710b5722339aa75d116a90f | |
parent | 6235c0b8dcb941312da644bf62ba202c10b71e74 (diff) | |
download | PeerTube-3c4754a3a16939337bfeb90c375fbb9e0f7d91fb.tar.gz PeerTube-3c4754a3a16939337bfeb90c375fbb9e0f7d91fb.tar.zst PeerTube-3c4754a3a16939337bfeb90c375fbb9e0f7d91fb.zip |
Wait transcoding by default when importing a video
-rw-r--r-- | server/lib/video-import.ts | 2 | ||||
-rw-r--r-- | server/tests/api/videos/video-channel-syncs.ts | 4 | ||||
-rw-r--r-- | 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 | |||
115 | language: importDataOverride?.language || importData.language, | 115 | language: importDataOverride?.language || importData.language, |
116 | commentsEnabled: importDataOverride?.commentsEnabled ?? CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED, | 116 | commentsEnabled: importDataOverride?.commentsEnabled ?? CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED, |
117 | downloadEnabled: importDataOverride?.downloadEnabled ?? CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED, | 117 | downloadEnabled: importDataOverride?.downloadEnabled ?? CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED, |
118 | waitTranscoding: importDataOverride?.waitTranscoding || false, | 118 | waitTranscoding: importDataOverride?.waitTranscoding ?? true, |
119 | state: VideoState.TO_IMPORT, | 119 | state: VideoState.TO_IMPORT, |
120 | nsfw: importDataOverride?.nsfw || importData.nsfw || false, | 120 | nsfw: importDataOverride?.nsfw || importData.nsfw || false, |
121 | description: importDataOverride?.description || importData.description, | 121 | 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 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | ||
2 | |||
1 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
2 | import { FIXTURE_URLS } from '@server/tests/shared' | 4 | import { FIXTURE_URLS } from '@server/tests/shared' |
3 | import { areHttpImportTestsDisabled } from '@shared/core-utils' | 5 | import { areHttpImportTestsDisabled } from '@shared/core-utils' |
@@ -76,6 +78,7 @@ describe('Test channel synchronizations', function () { | |||
76 | }) | 78 | }) |
77 | 79 | ||
78 | expect(video.name).to.equal('small video - youtube') | 80 | expect(video.name).to.equal('small video - youtube') |
81 | expect(video.waitTranscoding).to.be.true | ||
79 | 82 | ||
80 | const { total } = await servers[0].videos.listByChannel({ handle: 'root_channel', include: VideoInclude.NOT_PUBLISHED_STATE }) | 83 | const { total } = await servers[0].videos.listByChannel({ handle: 'root_channel', include: VideoInclude.NOT_PUBLISHED_STATE }) |
81 | expect(total).to.equal(1) | 84 | expect(total).to.equal(1) |
@@ -109,6 +112,7 @@ describe('Test channel synchronizations', function () { | |||
109 | }) | 112 | }) |
110 | expect(total).to.equal(2) | 113 | expect(total).to.equal(2) |
111 | expect(data[0].name).to.equal('test') | 114 | expect(data[0].name).to.equal('test') |
115 | expect(data[0].waitTranscoding).to.be.true | ||
112 | } | 116 | } |
113 | }) | 117 | }) |
114 | 118 | ||
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 () { | |||
30 | }) | 30 | }) |
31 | 31 | ||
32 | it('Should upload video with long description', async function () { | 32 | it('Should upload video with long description', async function () { |
33 | this.timeout(10000) | 33 | this.timeout(30000) |
34 | 34 | ||
35 | const attributes = { | 35 | const attributes = { |
36 | description: longDescription | 36 | description: longDescription |