Fix #3395: fix pixiv API exception when uploading bad pixiv id images.
Fixes an exception when attempting to upload a Pixiv image from a deleted work. The download strategy tries to fetch the source data in the course of rewriting the URL, which fails if the work has been deleted from Pixiv. Raise a BadIDError and leave the URL as-is (don't rewrite it).
This commit is contained in:
@@ -27,6 +27,8 @@ module Downloads
|
||||
data[:ugoira_content_type] = source.ugoira_content_type
|
||||
end
|
||||
|
||||
return [url, headers, data]
|
||||
rescue PixivApiClient::BadIDError
|
||||
return [url, headers, data]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user