diff options
author | Chocobozzz <me@florianbigard.com> | 2022-11-14 11:11:39 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-11-14 11:11:39 +0100 |
commit | 4efa5535ccc947597b7a8e343d6665229ab9cfce (patch) | |
tree | 7d3167499c83a9ef33782d4a120f0f757e919819 /server/lib | |
parent | 0e45e336f62a411b3c423be46d16252355c754d7 (diff) | |
download | PeerTube-4efa5535ccc947597b7a8e343d6665229ab9cfce.tar.gz PeerTube-4efa5535ccc947597b7a8e343d6665229ab9cfce.tar.zst PeerTube-4efa5535ccc947597b7a8e343d6665229ab9cfce.zip |
Fix infinite playlist import
Using an hard videos limit in config
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/job-queue/handlers/video-channel-import.ts | 3 | ||||
-rw-r--r-- | server/lib/sync-channel.ts | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/video-channel-import.ts b/server/lib/job-queue/handlers/video-channel-import.ts index c3dd8a688..035f88e96 100644 --- a/server/lib/job-queue/handlers/video-channel-import.ts +++ b/server/lib/job-queue/handlers/video-channel-import.ts | |||
@@ -37,6 +37,7 @@ export async function processVideoChannelImport (job: Job) { | |||
37 | await synchronizeChannel({ | 37 | await synchronizeChannel({ |
38 | channel: videoChannel, | 38 | channel: videoChannel, |
39 | externalChannelUrl: payload.externalChannelUrl, | 39 | externalChannelUrl: payload.externalChannelUrl, |
40 | channelSync | 40 | channelSync, |
41 | videosCountLimit: CONFIG.IMPORT.VIDEO_CHANNEL_SYNCHRONIZATION.FULL_SYNC_VIDEOS_LIMIT | ||
41 | }) | 42 | }) |
42 | } | 43 | } |
diff --git a/server/lib/sync-channel.ts b/server/lib/sync-channel.ts index 4d00d6163..10167ee38 100644 --- a/server/lib/sync-channel.ts +++ b/server/lib/sync-channel.ts | |||
@@ -12,8 +12,8 @@ import { ServerConfigManager } from './server-config-manager' | |||
12 | export async function synchronizeChannel (options: { | 12 | export async function synchronizeChannel (options: { |
13 | channel: MChannelAccountDefault | 13 | channel: MChannelAccountDefault |
14 | externalChannelUrl: string | 14 | externalChannelUrl: string |
15 | videosCountLimit: number | ||
15 | channelSync?: MChannelSync | 16 | channelSync?: MChannelSync |
16 | videosCountLimit?: number | ||
17 | onlyAfter?: Date | 17 | onlyAfter?: Date |
18 | }) { | 18 | }) { |
19 | const { channel, externalChannelUrl, videosCountLimit, onlyAfter, channelSync } = options | 19 | const { channel, externalChannelUrl, videosCountLimit, onlyAfter, channelSync } = options |