If the yande.re or konachan.com post has a source from a supported site, for example Pixiv or Twitter, then delegate the artist and commentary lookup to that substrategy. Only do this for sources from recognized sites, not the null strategy.
34 lines
450 B
Ruby
34 lines
450 B
Ruby
module Sources
|
|
module Strategies
|
|
class Null < Base
|
|
def image_urls
|
|
[url]
|
|
end
|
|
|
|
def page_url
|
|
url
|
|
end
|
|
|
|
def canonical_url
|
|
image_url
|
|
end
|
|
|
|
def normalized_for_artist_finder?
|
|
true
|
|
end
|
|
|
|
def normalizable_for_artist_finder?
|
|
false
|
|
end
|
|
|
|
def normalize_for_artist_finder
|
|
url
|
|
end
|
|
|
|
def unique_id
|
|
url
|
|
end
|
|
end
|
|
end
|
|
end
|