Repository navigation
Description
What happened
On the Android phone, progress made while playing a downloaded title stays on the device. The server never receives it, so other devices and the web never see it.
That local copy also overrides the server. The shared overlay lets any local position larger than the server's win, and a watched title has no position on the server. Once another device finishes a title, the phone still offers "Continue Watching? You stopped at 10:46." for it, and the episode card shows the watched check together with a progress bar.
#842 is the same overlay rule on Android TV. #845 stops the TV player from saving sequenced sessions locally, but not this.
Steps to reproduce
On a Silo dev deployment, as a regular user with downloads allowed, on an Android 16 phone emulator:
- Download a movie (here: a 24-minute title).
- Turn on airplane mode. Play the download, skip to about 10:30, and press Back.
- Turn airplane mode off, relaunch the app and wait 90 seconds.
- Read the profile's progress on the server (
GET /api/v2/progress): it has no entry for the title. - On the phone, open the title and tap Play: "Continue Watching? You stopped at 10:46."
- Finish the title on another client (here
POST /api/v2/sync/progresswith a position past the watched threshold). The server storescompleted: true,position_seconds: 0. - Relaunch the phone app and open the title. Watched is set, and tapping Play still offers "You stopped at 10:46."
- The same with a downloaded episode: after step 6, the series page's episode card shows the watched check and a progress bar at the old local position, and "Play S1·E1" offers to resume.
Expected behavior
Progress from downloaded playback reaches the server once the phone is back online, through /api/v2/sync/progress with the time it happened. After that the server decides what the title shows. A title the server has marked watched offers Play.
Silo version / commit
silo-android fix/issue-842-resume-after-watched 9efdf93 (main f13a265 plus #845, which changes no phone code on this path), phone debug build. silo-server main a52941174.
Deployment
Local dev sandbox (Docker), server built from main.
Clients affected
Android phone. Android TV uses the same local store and overlay. Apple keeps local progress only for downloads and syncs it with updated_at; Roku keeps none.
Relevant logs
Offline playback of the download (phone logcat):
I PlayerViewModel: tryLocalPlayback: serving Thats My Boy (2015) [WEBDL-480p 8-bit x264 AAC 2.0][ML]-SWARM.mkv (124931851B) for content=movie-tmdb-647677 (sidecar id=151033113391155575) offlineAudio=1 sidecarSubtitles=8
App database after exiting the player (user_item_state and dirty_operations):
['contentId', 'fileId', 'positionSeconds', 'durationSeconds', 'clientUpdatedAtMs', 'positionUpdatedAtMs']
('movie-tmdb-647677', 62, 646.472, 1453.456, 1794090285797, 1794090285797)
['id', 'opKind', 'targetContentId', 'state', 'payloadJson']
Server progress for the profile 90 seconds after reconnecting; the server log for those minutes has no progress or playback-session request from the phone:
{"items":[],"page":{"has_more":false}}
Technical notes
Why progress is lost:
PlayerViewModel.tryLocalPlaybackstarts no server session, so nothing reports progress during downloaded playback.RoomUserItemStateRepository.recordPositionOwnedwrites the Room row and returns before enqueuingSET_POSITIONwhenebookAuthoritiesis set (android-shared/.../RoomUserItemStateRepository.kt, theif (ebookAuthorities != null) return@withTransactionline).AndroidModuleandAndroidTvModuleboth set it.SyncEnginedrains only ebook progress and holds legacy personal-data rows unsent, so even an enqueuedSET_POSITIONwould never be sent.
Why stale positions win:
applyLocalPlaybackProgress/localProgressWinsinshared/.../viewmodel/LocalUserStateOverlay.ktcompare positions only. Phone detail, episode rails and Home sections all use it.
On the phone, streaming did not leave local positions in this run: Back, pause then the on-screen back arrow, and backgrounding all left only a track-selection row with position 0. PlayerViewModel.maybeRecordPosition still guards on the UI-state sessionId, which exit clears before the player's last pause; that is the TV race #845 fixed with exitSessionId.
The server already supports the fix. POST /api/v2/sync/progress takes updated_at per item, applies the watched and minimum-resume thresholds (userstore.ResolveProgressState) and newest-write-wins (SetProgressIfNewer). docs/downloads-api.md §9.2 and §11.6 describe this offline queue for Android.
Agreed design:
- Write a local resume position only for downloaded (local-file) playback. Streaming never writes one, on phone or TV. The phone's
maybeRecordPositionguard gets the same treatment fix(tv): show Play, not Resume, after a title is marked watched #845 gave TV. - Queue each offline position with its event time and send it through
/api/v2/sync/progresswithupdated_at. Delete the local position once the server accepts it; from then on the server is the truth. - Change the overlay rule from "local is bigger, so it wins" to "only a local position still waiting to sync wins". After sync, local never overrides the server.
- One-time cleanup: delete local resume positions for anything that isn't a download on this device. Keep track fingerprints, CFI and reading progress in the same table.
No client-side copy of the watch threshold. A finished offline download may show Resume until it syncs.
This resolves #21 (offline progress queue). It changes files #845 changes, so the fix stacks on #845.
AI harness
Claude Code
AI tool(s)
T3 Code device tools (Android emulator), GitHub CLI
AI model(s)
claude-opus-5-5
AI involvement
Reproduced, investigated and wrote this issue, directed by a maintainer who agreed the design.
Independent or adversarial review
None yet.
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported (Downloads: offline watch-progress queue with server reconciliation #21 covers the sync part and is referenced above)
- I reproduced this myself on a real deployment
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Source: follow-up to #842 and #845, reproduced on a dev sandbox.
Activity
zZebrahz commentedon Nov 7, 2026
🤖 AI agent claim. Claude Code (claude-opus-5-5) is working on a fix for this issue on behalf of @zZebrahz, who is assigned.
A pull request will link here when the fix is ready. If the work stops without a fix, the assignment and this comment are removed.
Planning to work on this, or have context to add? Reply here and mention @zZebrahz.
fix(progress): sync download progress and stop stale local resume
fix(progress): send download progress to the server and stop stale lo…