-
Notifications
You must be signed in to change notification settings - Fork 82
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
[Kitsu API] Deals with the case where there is no small/tiny image #596
base: master
Are you sure you want to change the base?
Conversation
@Kcchouette, try writing more descriptive commit message than just "Update X" or "Fix Y" |
@ahmubashshir you are right, but when merging you can squash it |
People do more merge than squash, and the "Update X/Y" commit messages don't sense in that situation. Fun fact: you didn't have to write a good description and title for the PR at all, if you write commit messages properly, github-cli uses the first commit title as PR title and generates the body from either first commit message body or from the title of all commit unmerged in that branch. |
@@ -560,8 +560,8 @@ def _parse_info(self, media): | |||
# For now I'm just picking the romaji title in these cases. | |||
'title': attr['titles'].get('en_jp') or attr.get('canonicalTitle') or attr['titles'].get('en'), | |||
'total': total or 0, | |||
'image': attr['posterImage'] and attr['posterImage']['small'], | |||
'image_thumb': attr['posterImage'] and attr['posterImage']['tiny'], | |||
'image': attr['posterImage'] and attr['posterImage'].get('small'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a fallback to 'original' if 'small' cannot be found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image
is used by the details dialog. How small is the small thumb? And yes I think a fallback to original would be sensible as the details dialog can be as big as you want to.
In the case of a recent anime, here the content we have back for poster:
(for CUE anime / id = 44979)
So we have no small/tiny poster and so trackma keeps crashing