fully implement ugoira js player, upgrade jquery and jquery-ui
This commit is contained in:
@@ -95,7 +95,7 @@ class Post < ActiveRecord::Base
|
||||
|
||||
def large_file_url
|
||||
if has_large?
|
||||
"/data/sample/#{file_path_prefix}#{Danbooru.config.large_image_prefix}#{md5}.jpg"
|
||||
"/data/sample/#{file_path_prefix}#{Danbooru.config.large_image_prefix}#{md5}.#{large_file_ext}"
|
||||
else
|
||||
file_url
|
||||
end
|
||||
@@ -146,7 +146,7 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def has_preview?
|
||||
is_image? || is_video?
|
||||
is_image? || is_video? || is_ugoira?
|
||||
end
|
||||
|
||||
def has_dimensions?
|
||||
@@ -168,7 +168,7 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def has_large?
|
||||
is_image? && image_width.present? && image_width > Danbooru.config.large_image_width
|
||||
is_ugoira? || (is_image? && image_width.present? && image_width > Danbooru.config.large_image_width)
|
||||
end
|
||||
|
||||
def has_large
|
||||
|
||||
@@ -355,7 +355,6 @@ class Upload < ActiveRecord::Base
|
||||
self.file_path = destination_path
|
||||
download = Downloads::File.new(source, destination_path, :is_ugoira => has_ugoira_tag?)
|
||||
download.download!
|
||||
self.source = download.source
|
||||
ugoira_service.load(download.data)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user