about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-03-26 01:56:41 +0100
committerGitHub <noreply@github.com>2020-03-26 01:56:41 +0100
commit0c8945e5ff9e75dd322ee2b2c4ea9cc1dc728911 (patch)
treefd2489163804272efcfbca55678de25fb274556a /app/models
parente187537dfdf8ec1d25479d9ad4d7b0114f30ba65 (diff)
Change `tootctl media remove-orphans` to work for all classes (#13316)
Change `tootctl media lookup` to not use an interactive prompt
Diffstat (limited to 'app/models')
-rw-r--r--app/models/media_attachment.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 31aa918b7..f45e2c9f7 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -184,19 +184,6 @@ class MediaAttachment < ApplicationRecord
     audio? || video?
   end
 
-  def variant?(other_file_name)
-    return true if file_file_name == other_file_name
-    return false if file_file_name.nil?
-
-    formats = file.styles.values.map(&:format).compact
-
-    return false if formats.empty?
-
-    extension = File.extname(other_file_name)
-
-    formats.include?(extension.delete('.')) && File.basename(other_file_name, extension) == File.basename(file_file_name, File.extname(file_file_name))
-  end
-
   def to_param
     shortcode
   end