posts: automatically tag videos with sound.
Automatically add the `sound` tag if the post has sound. Remove the tag if the post doesn't have sound. A video is considered to have sound if its peak loudness is greater than -70 dB. The current quietest post on Danbooru has a peak loudness of -62 dB (post #3470668), but it's possible to have audible sound at -80 dB or possibly even lower. It's hard to draw a clear line between "silent" and "barely audible".
This commit is contained in:
@@ -22,7 +22,7 @@ class MediaAsset < ApplicationRecord
|
||||
has_many :ai_tags
|
||||
|
||||
delegate :frame_delays, :metadata, to: :media_metadata
|
||||
delegate :is_non_repeating_animation?, :is_greyscale?, :is_rotated?, :is_ai_generated?, to: :metadata
|
||||
delegate :is_non_repeating_animation?, :is_greyscale?, :is_rotated?, :is_ai_generated?, :has_sound?, to: :metadata
|
||||
|
||||
scope :public_only, -> { where(is_public: true) }
|
||||
scope :private_only, -> { where(is_public: false) }
|
||||
|
||||
Reference in New Issue
Block a user