Skip to content

fix(mobile): a Direct play download refused as the stand-in MP4 asks put.io again - #841

Open
altaywtf wants to merge 4 commits into
mainfrom
fix/763-direct-play-unanswered-lookup
Open

altaywtf wants to merge 4 commits into
mainfrom
fix/763-direct-play-unanswered-lookup

Conversation

@altaywtf

@altaywtf altaywtf commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Change

A Direct play download that waited offline now starts when the network returns, with no Retry.

Step Before After
Lookup gets no answer (offline) Starts the converted MP4 as a stand-in Same, and the row records the unanswered lookup
Stand-in refused with 0 bytes (file has no MP4 copy) Failed · No longer available, plus a notification With the app open, asks put.io again and starts the original; otherwise notifies, and asks again when the app opens
Second lookup gets no answer n/a Row stays failed with one notification; no loop
  • Cause: the stand-in MP4 404s on a file with no converted copy, such as an original MP4. The resolved URL was never stale.

Closes #763

Validation

  • ./gradlew verifyMobile
  • :mobile:testProductionDebugUnitTest --tests "io.putdotio.android.downloads.*"; the two new DownloadMethodsTest cases fail on main

Unverified: device QA on the Pixel.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T17:35:13.203047Z 3b3431d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc3adc943e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@altaywtf

Copy link
Copy Markdown
Member Author

Not merged. The service-only gap is still open, and device QA didn't run.

Check Result
Codex audit, notification Try again racing the controller re-ask Fixed in 5b29974: the re-ask runs only when a row newly reaches the 0-byte refusal
New test aRefusedRowThatANotificationRetryMarksUnansweredIsNotAskedAgain Passes; fails with the old controller
downloads.* unit tests, verifyMobile at 5b29974 Pass
Refusal while only the download service runs (no DownloadsController) Open: the notification is held back and nothing re-asks until the app opens (inline)
Pixel: offline Direct play, then online Not run: phone has a secure lock
Pixel: Retry, Pause before bytes, Resume Not run
Pixel: mid-download Pause and Resume Not run

Next step: hold back the notification only while a controller owns the retry, or run the re-ask from the service.

…put.io again

A Direct play video whose lookup gets no answer, as when the device is
offline, starts as the converted MP4. A file with no converted copy, such
as an original MP4, then fails with 404 once the network returns and the
row shows No longer available until Retry asks again.

The row now remembers the lookup went unanswered. When that stand-in is
refused before its first byte, the controller asks put.io again and starts
the answer, with no failure notification. A second unanswered lookup
leaves the row failed, so it never loops.

Closes #763
…s refusal

A notification Try again that gets no answer marks the already-refused row
unanswered while it starts the stand-in itself. The controller re-asked on
that write too, so two starts raced for the same download.
… a controller asks again

DownloadsController lives in the Downloads view model, so a refusal reached
by the download service alone (process death, scheduler, boot) had no owner
to re-ask Direct play and the user heard nothing. The view model now holds a
per-account redecider while its controller runs; without one the failure
notification posts and the next controller re-asks on open.
@altaywtf
altaywtf force-pushed the fix/763-direct-play-unanswered-lookup branch from 1b82bbd to 3b3431d Compare November 15, 2026 17:33

This branch has not been deployed

No deployments
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.

Downloads: a download paused before its first byte fails with No longer available

1 participant