Skip to content

Fix Yandex API rate limits and resume partial library refreshes - #4

Merged
jaFuart merged 2 commits into
mainfrom
fix/yandex-api-rate-limit
Nov 9, 2026
Merged

jaFuart merged 2 commits into
mainfrom
fix/yandex-api-rate-limit

Conversation

@jaFuart

@jaFuart jaFuart commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

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.

@jaFuart
jaFuart merged commit b5964e6 into main Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant