Commits (2)
......@@ -80,7 +80,7 @@ export async function synchronizeChannel (options: {
async function skipImport (channel: MChannel, targetUrl: string, onlyAfter?: Date) {
if (await VideoImportModel.urlAlreadyImported(channel.id, targetUrl)) {
logger.debug('%s is already imported for channel %s, skipping video channel synchronization.', channel.name, targetUrl)
logger.debug('%s is already imported for channel %s, skipping video channel synchronization.', targetUrl, channel.name)
return true
}
......@@ -94,9 +94,9 @@ async function skipImport (channel: MChannel, targetUrl: string, onlyAfter?: Dat
const videoInfo = await youtubeDL.getInfoForDownload()
const onlyAfterWithoutTime = new Date(onlyAfter)
onlyAfterWithoutTime.setHours(0, 0, 0)
onlyAfterWithoutTime.setHours(0, 0, 0, 0)
if (videoInfo.originallyPublishedAtWithoutTime.getTime() >= onlyAfterWithoutTime.getTime()) {
if (videoInfo.originallyPublishedAtWithoutTime.getTime() < onlyAfterWithoutTime.getTime()) {
return true
}
}
......
......@@ -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,
......
/* 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
}
})
......
......@@ -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
......