Repository navigation
Fix Yandex API rate limits and resume partial library refreshes - #4
Merged
Merged
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.
Opening the library could overlap the baseline/background sync and produce HTTP 429 (Concurrency limit exceeded). Metadata for all liked tracks were fetched again on every refresh and only saved after the last batch, so a single failed response could leave the screen empty.
Music API calls now share a serial, interruptible queue with a 500 ms gap, bounded backoff for HTTP 429 and support for Retry-After. Long server cooldowns are retained without retrying early. OAuth polling and audio streaming keep their existing behavior.
The library reuses cached track details, checkpoints each successful batch before displaying it, and resumes with missing details on retry. A partial refresh retains previous rows and never marks the snapshot complete. The UI shows server-requested pauses and keeps already-loaded tracks available after errors.
Version 0.2.1 (5) uses the existing release signing key and can update the published 0.2.0 without deleting app data.
Validation: CI passed on the final commit, including 43 JVM tests, 14 Android instrumentation tests and a debug APK build. Regression tests cover rate-limit handling, cancellation, connection cleanup and SQLite refresh/resume using fake API responses without real Yandex credentials.