From 10ddbae07bf612bd654a6ed06e1c90472d3b1497 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 26 Jun 2021 22:48:47 -0500 Subject: [PATCH] posts: change video_with_sound tag to sound. The `video_with_sound` tag was aliased to `sound`. Fix the autotagger and the thumbnail icon. https://danbooru.donmai.us/forum_topics/18818 --- app/components/post_preview_component.rb | 2 +- app/logical/upload_service/utils.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/post_preview_component.rb b/app/components/post_preview_component.rb index ee7555dcc..9a867cdfa 100644 --- a/app/components/post_preview_component.rb +++ b/app/components/post_preview_component.rb @@ -72,7 +72,7 @@ class PostPreviewComponent < ApplicationComponent def data_attributes attributes = { "data-id" => post.id, - "data-has-sound" => post.has_tag?("video_with_sound|flash_with_sound"), + "data-has-sound" => post.has_tag?("sound"), "data-tags" => post.tag_string, "data-pools" => post.pool_string, "data-approver-id" => post.approver_id, diff --git a/app/logical/upload_service/utils.rb b/app/logical/upload_service/utils.rb index 3ff663e1a..bbc194f49 100644 --- a/app/logical/upload_service/utils.rb +++ b/app/logical/upload_service/utils.rb @@ -66,7 +66,7 @@ class UploadService def automatic_tags(media_file) tags = [] - tags << "video_with_sound" if media_file.has_audio? + tags << "sound" if media_file.has_audio? tags << "animated_gif" if media_file.file_ext == :gif && media_file.is_animated? tags << "animated_png" if media_file.file_ext == :png && media_file.is_animated? tags.join(" ")