aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-11-14 11:11:39 +0100
committerChocobozzz <me@florianbigard.com>2022-11-14 11:11:39 +0100
commit4efa5535ccc947597b7a8e343d6665229ab9cfce (patch)
tree7d3167499c83a9ef33782d4a120f0f757e919819 /server/initializers
parent0e45e336f62a411b3c423be46d16252355c754d7 (diff)
downloadPeerTube-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/initializers')
-rw-r--r--server/initializers/checker-before-init.ts1
-rw-r--r--server/initializers/config.ts3
2 files changed, 4 insertions, 0 deletions
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 () {
35 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'import.videos.timeout', 35 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'import.videos.timeout',
36 'import.video_channel_synchronization.enabled', 'import.video_channel_synchronization.max_per_user', 36 'import.video_channel_synchronization.enabled', 'import.video_channel_synchronization.max_per_user',
37 'import.video_channel_synchronization.check_interval', 'import.video_channel_synchronization.videos_limit_per_synchronization', 37 'import.video_channel_synchronization.check_interval', 'import.video_channel_synchronization.videos_limit_per_synchronization',
38 'import.video_channel_synchronization.full_sync_videos_limit',
38 'auto_blacklist.videos.of_users.enabled', 'trending.videos.interval_days', 39 'auto_blacklist.videos.of_users.enabled', 'trending.videos.interval_days',
39 'client.videos.miniature.display_author_avatar', 40 'client.videos.miniature.display_author_avatar',
40 'client.videos.miniature.prefer_author_display_name', 'client.menu.login.redirect_on_single_external_auth', 41 '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 = {
418 get CHECK_INTERVAL () { return parseDurationToMs(config.get<string>('import.video_channel_synchronization.check_interval')) }, 418 get CHECK_INTERVAL () { return parseDurationToMs(config.get<string>('import.video_channel_synchronization.check_interval')) },
419 get VIDEOS_LIMIT_PER_SYNCHRONIZATION () { 419 get VIDEOS_LIMIT_PER_SYNCHRONIZATION () {
420 return config.get<number>('import.video_channel_synchronization.videos_limit_per_synchronization') 420 return config.get<number>('import.video_channel_synchronization.videos_limit_per_synchronization')
421 },
422 get FULL_SYNC_VIDEOS_LIMIT () {
423 return config.get<number>('import.video_channel_synchronization.full_sync_videos_limit')
421 } 424 }
422 } 425 }
423 }, 426 },