Merge pull request #5061 from SystemZ/feat-conf-max-video-length

Configurable max video duration during upload
This commit is contained in:
evazion
2022-03-22 03:41:32 -05:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ class MediaAsset < ApplicationRecord
class Error < StandardError; end
VARIANTS = %i[preview 180x180 360x360 720x720 sample original]
MAX_VIDEO_DURATION = 140 # 2:20
MAX_VIDEO_DURATION = Danbooru.config.max_video_duration.to_i
MAX_IMAGE_RESOLUTION = Danbooru.config.max_image_resolution
MAX_IMAGE_WIDTH = Danbooru.config.max_image_width
MAX_IMAGE_HEIGHT = Danbooru.config.max_image_height

View File

@@ -171,6 +171,12 @@ module Danbooru
40000
end
# Maximum duration of an video in seconds.
def max_video_duration
# 2:20m
140
end
# How long pending posts stay in the modqueue before being deleted.
def moderation_period
3.days