X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fsync-channel.ts;h=3a805a943d6ab5c01271c37807ae54cf4d0ac58e;hb=96d00a997b9847f6796c02dbff01bca2c99385c6;hp=35af91429c1218bc08ffba4eb3440a4952b13321;hpb=49aa917509568a3b96967732512b5ef4ecc50b1b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/sync-channel.ts b/server/lib/sync-channel.ts index 35af91429..3a805a943 100644 --- a/server/lib/sync-channel.ts +++ b/server/lib/sync-channel.ts @@ -1,7 +1,7 @@ import { logger } from '@server/helpers/logger' import { YoutubeDLWrapper } from '@server/helpers/youtube-dl' import { CONFIG } from '@server/initializers/config' -import { buildYoutubeDLImport } from '@server/lib/video-import' +import { buildYoutubeDLImport } from '@server/lib/video-pre-import' import { UserModel } from '@server/models/user/user' import { VideoImportModel } from '@server/models/video/video-import' import { MChannel, MChannelAccountDefault, MChannelSync } from '@server/types/models' @@ -12,8 +12,8 @@ import { ServerConfigManager } from './server-config-manager' export async function synchronizeChannel (options: { channel: MChannelAccountDefault externalChannelUrl: string + videosCountLimit: number channelSync?: MChannelSync - videosCountLimit?: number onlyAfter?: Date }) { const { channel, externalChannelUrl, videosCountLimit, onlyAfter, channelSync } = options @@ -76,7 +76,7 @@ export async function synchronizeChannel (options: { await JobQueue.Instance.createJobWithChildren(parent, children) } catch (err) { - logger.error(`Failed to import channel ${channel.name}`, { err }) + logger.error(`Failed to import ${externalChannelUrl} in channel ${channel.name}`, { err }) channelSync.state = VideoChannelSyncState.FAILED await channelSync.save() }