Fix most entries that are currently not loading - #359
Open
stefan9999991 wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most entries in the app haven't been loading for a few weeks. I investigated and this is because the Jikan api currently has some problems. The issues that I identified that I could solve were that the
XamarinHttpClientnegotiatedHTTP/2.0while Jikan doesn't support that, and that without a specificAccept-Encodingstring, most requests received a504 Gateway Timeouterror. I fixed both issues in JikanDotNet (the library we use to interface with the API) and opened an upstream PR, and pointed the dependency source in this project to that fork.You can verify the changes in the package by going to the fork. I published the package through github actions (not manually) so the published binary can be traced directly back to that exact source with no manual build step in between.
This includes a new
nuget.configpointing at that package's feed. This is meant to be temporary — once the upstream PR is merged and a new official release is published, we should revert to the standard NuGet package. This fixed most entries, but not all which was quite annoying, so I changed the api used for retrieving anime entry data to the official mal api so all entries succeeded. Tested locally: previously-failing entries (e.g. "Fire Force" ID 38671) now load reliably. Note that Jikan's API itself still appears to have some ongoing stability issues independent of this fix, so occasional failures may still occur, but this significantly improves reliability for the other functions that still rely on it.I also changed the api used for retrieving seasonal data to the official MAL api, so the season tab loads again. Since Jikan is having so much trouble, and MAL has an api again, it might be worth considering moving some of the api calls from Jikan to MAL. This would not be possible for all, since for example the MAL api doesn't expose an endpoint that gives episode information (titles and stuff).