From 4efa5535ccc947597b7a8e343d6665229ab9cfce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Nov 2022 11:11:39 +0100 Subject: Fix infinite playlist import Using an hard videos limit in config --- server/initializers/checker-before-init.ts | 1 + server/initializers/config.ts | 3 +++ 2 files changed, 4 insertions(+) (limited to 'server/initializers') diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index e5ec0d1df..42be7ee6e 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -35,6 +35,7 @@ function checkMissedConfig () { 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'import.videos.timeout', 'import.video_channel_synchronization.enabled', 'import.video_channel_synchronization.max_per_user', 'import.video_channel_synchronization.check_interval', 'import.video_channel_synchronization.videos_limit_per_synchronization', + 'import.video_channel_synchronization.full_sync_videos_limit', 'auto_blacklist.videos.of_users.enabled', 'trending.videos.interval_days', 'client.videos.miniature.display_author_avatar', 'client.videos.miniature.prefer_author_display_name', 'client.menu.login.redirect_on_single_external_auth', diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 7652da24a..3dd1f6971 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -418,6 +418,9 @@ const CONFIG = { get CHECK_INTERVAL () { return parseDurationToMs(config.get('import.video_channel_synchronization.check_interval')) }, get VIDEOS_LIMIT_PER_SYNCHRONIZATION () { return config.get('import.video_channel_synchronization.videos_limit_per_synchronization') + }, + get FULL_SYNC_VIDEOS_LIMIT () { + return config.get('import.video_channel_synchronization.full_sync_videos_limit') } } }, -- cgit v1.2.3