posts: don't remove sound tag from Flash posts.
Fix a bug in 28237e2e0 where editing a Flash post would automatically remove the `sound` tag.
This commit is contained in:
@@ -402,7 +402,7 @@ class Post < ApplicationRecord
|
||||
end
|
||||
|
||||
def add_automatic_tags(tags)
|
||||
tags -= %w[incredibly_absurdres absurdres highres lowres flash video ugoira animated_gif animated_png exif_rotation non-repeating_animation non-web_source wide_image tall_image sound]
|
||||
tags -= %w[incredibly_absurdres absurdres highres lowres flash video ugoira animated_gif animated_png exif_rotation non-repeating_animation non-web_source wide_image tall_image]
|
||||
|
||||
if tags.size >= 30
|
||||
tags -= ["tagme"]
|
||||
@@ -472,6 +472,9 @@ class Post < ApplicationRecord
|
||||
tags << "exif_rotation" if media_asset.is_rotated?
|
||||
tags << "non-repeating_animation" if media_asset.is_non_repeating_animation?
|
||||
tags << "ai-generated" if media_asset.is_ai_generated?
|
||||
|
||||
# Allow Flash files to be manually tagged as `sound`; other files are automatically tagged.
|
||||
tags -= ["sound"] unless is_flash?
|
||||
tags << "sound" if media_asset.has_sound?
|
||||
|
||||
tags
|
||||
|
||||
Reference in New Issue
Block a user