Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return early for cover images that are not found #512

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

samwilson
Copy link
Member

BookProvider::getCover() was already returning for no pages returned, so this switches to API formatversion 2 and also checks for the missing parameter in the first/only returned page.

Bug: T370257

BookProvider::getCover() was already returning for no pages
returned, so this switches to API formatversion 2 and also
checks for the `missing` parameter in the first/only returned
page.

Bug: T370257
@samwilson
Copy link
Member Author

I think I might merge this if no one minds? Just to clear up the log spam if nothing else (and it'll help a few dozen people who daily try to download books that have incorrect cover images).

There are other related issues, but they seem mostly to be needed to be resolved on wikis. e.g. eswikisource are encoding their cover image; I left them a message at https://es.wikisource.org/wiki/Plantilla_discusi%C3%B3n:Proofreadpage_index_template#ws-cover

@Tpt
Copy link
Collaborator

Tpt commented Aug 19, 2024

Yes!

@samwilson samwilson merged commit aadedad into main Aug 19, 2024
5 checks passed
@samwilson samwilson deleted the cover-image-not-found branch August 19, 2024 12:15
samwilson added a commit that referenced this pull request Aug 20, 2024
Because shared-repo images are reported as missing, do not check
for that status. And to make things simpler, use the same handling
for invalid ones as well, and just check to see if any imageinfo
metadata has been returned (that's all we're interested in, after
all).

This is a follow-up to GH #512.

Bug: T372956
samwilson added a commit that referenced this pull request Aug 20, 2024
Because shared-repo images are reported as missing, do not check
for that status. And to make things simpler, use the same handling
for invalid ones as well, and just check to see if any imageinfo
metadata has been returned (that's all we're interested in, after
all).

This is a follow-up to GH #512.

Bug: T372956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants