Add fallback url for kitsu sync#2552
Open
PiterWeb wants to merge 17 commits intorecloudstream:masterfrom
Open
Conversation
…dded to BackupUtils.kt, Kitsu panel now does pagination fine
…ate, and use a unique API call to get the library item and map it to the anime
…mple while loop, simpler and more complete in data load function
Review changes for pull request on main repo
fire-light42
requested changes
Mar 6, 2026
Collaborator
fire-light42
left a comment
There was a problem hiding this comment.
This contains a lot of WET code.
You should use an OkHttp interceptor, or helper function to only write the fallback logic once.
If you need to log errors you should use our built-in function logError(throwable: Throwable).
Contributor
Author
|
Yeah you are very right, I will investigate on interceptors or create a function like you said to do the code DRY.
OK, thank you for pointing out. |
Contributor
Author
|
I have moved the fallback logic to an OkHttp injector. Now it looks so much clean :D |
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.
As I mentioned in #2527 kitsu.io sometimes is down while kitsu.app is working and are equivalent but kitsu.io is the one that is documented as the api url domain.
So I added a fallback when any of the requests targeting kitsu.io fails it tries with kitsu.app.
This may fix the issue about not syncing anime.