From 7d3e491dc68b2be886e4faa2fd4be7792ab8bfad Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 26 Sep 2021 18:26:38 -0500 Subject: [PATCH] posts: stop autotagging huge_filesize. https://danbooru.donmai.us/forum_topics/19526 --- app/models/post.rb | 6 +----- test/unit/post_test.rb | 12 ------------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index b5ba47597..a6588f188 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -460,7 +460,7 @@ class Post < ApplicationRecord end def add_automatic_tags(tags) - tags -= %w[incredibly_absurdres absurdres highres lowres huge_filesize flash video ugoira animated_gif animated_png exif_rotation non-repeating_animation] + tags -= %w[incredibly_absurdres absurdres highres lowres flash video ugoira animated_gif animated_png exif_rotation non-repeating_animation] if image_width >= 10_000 || image_height >= 10_000 tags << "incredibly_absurdres" @@ -481,10 +481,6 @@ class Post < ApplicationRecord tags << "tall_image" end - if file_size >= 10.megabytes - tags << "huge_filesize" - end - if is_flash? tags << "flash" end diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index 7c95933f5..30ccf0701 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -1382,18 +1382,6 @@ class PostTest < ActiveSupport::TestCase end end - context "with a large file size" do - setup do - @post.file_size = 11.megabytes - @post.tag_string = "" - @post.save - end - - should "have the appropriate file size tags added automatically" do - assert_match(/huge_filesize/, @post.tag_string) - end - end - context "with a .zip file extension" do setup do @post.file_ext = "zip"