add exception for direct links to pixiv fanbox images
This commit is contained in:
@@ -148,7 +148,11 @@ class PixivApiClient
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pages
|
def pages
|
||||||
json["body"]["body"]["images"].map {|x| x["originalUrl"]}
|
if json["body"]["body"]
|
||||||
|
json["body"]["body"]["images"].map {|x| x["originalUrl"]}
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -180,10 +180,13 @@ module Sources
|
|||||||
public
|
public
|
||||||
|
|
||||||
def image_urls_sub
|
def image_urls_sub
|
||||||
|
if url =~ FANBOX_IMAGE
|
||||||
|
return [url]
|
||||||
|
end
|
||||||
|
|
||||||
# there's too much normalization bullshit we have to deal with
|
# there's too much normalization bullshit we have to deal with
|
||||||
# raw urls, so just fetch the canonical url from the api every
|
# raw urls, so just fetch the canonical url from the api every
|
||||||
# time.
|
# time.
|
||||||
|
|
||||||
if manga_page.present?
|
if manga_page.present?
|
||||||
return [metadata.pages[manga_page]]
|
return [metadata.pages[manga_page]]
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user