Skip to content

Arch: HTTP retry/backoff on playlist + EPG + TMDB calls #48

Description

@Yokomoko

From: review-reports/architect.md finding #12

Where: data/repo/SyncService.kt:78-85, data/repo/EpgFetchService.kt:69-75, data/tmdb/MovieEnrichmentService.kt:80-130

Issue: All HTTP calls use a single OkHttpClient.execute() with no retry logic. If the call fails, the entire operation fails or silently skips the item. On Fire Stick with flaky WiFi, a transient network blip during the 150 MB EPG download loses the entire fetch. TMDB enrichment silently skips failed movies with no retry queue.

Fix:

  1. Add an OkHttp interceptor with exponential backoff for HTTP 429, 5xx, and IOException (3 retries with 1s/2s/4s delays).
  2. For TMDB enrichment specifically, add a retry_attempted_at timestamp on movies so subsequent enrichBatch calls pick up previously-failed items.

User impact: libraries stay more complete when WiFi is flaky; EPG doesn't vanish after a minor network hiccup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsecondary-priorityHigh value — noticeably improves the experience

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions