implements #2350
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
module Sources
|
||||
class Site
|
||||
attr_reader :url, :strategy
|
||||
delegate :get, :referer_url, :site_name, :artist_name, :profile_url, :image_url, :tags, :artist_record, :unique_id, :page_count, :file_url, :ugoira_frame_data, :to => :strategy
|
||||
delegate :get, :get_size, :referer_url, :site_name, :artist_name, :profile_url, :image_url, :tags, :artist_record, :unique_id, :page_count, :file_url, :ugoira_frame_data, :to => :strategy
|
||||
|
||||
def self.strategies
|
||||
[Strategies::Pixiv, Strategies::NicoSeiga, Strategies::DeviantArt, Strategies::Nijie, Strategies::Twitter]
|
||||
|
||||
@@ -18,6 +18,10 @@ module Sources
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
def get_size
|
||||
@get_size ||= Downloads::File.new(@image_url).size
|
||||
end
|
||||
|
||||
# Subclasses should return true only if the URL is in its final normalized form.
|
||||
#
|
||||
# Sources::Site.new("http://img.pixiv.net/img/evazion").normalized_for_artist_finder?
|
||||
|
||||
Reference in New Issue
Block a user