fully implement ugoira js player, upgrade jquery and jquery-ui

This commit is contained in:
r888888888
2014-10-16 15:41:18 -07:00
parent 4c73fb9f79
commit 5f063d693a
33 changed files with 196 additions and 619 deletions

View File

@@ -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

View File

@@ -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