Skip to content

Delete revoked downloads and re-prepare expired files #531

Open

Description

@Quick104

Silo-Server/silo-server#2168 lets an administrator revoke a device's downloads and lets the
server delete its prepared remux/transcode file once the device has finished. The app
needs these changes, gated on the downloads capability.

Revoked entries (revoked_removes_local). When
GET /api/v2/capabilities/downloads reports revoked_removes_local: true, a registry
entry with status: "revoked" means an administrator revoked it. Delete the local
media and assets, remove the Room rows, and call DELETE /api/v2/downloads/{id}
(enqueue it if offline). Run the check from the periodic WorkManager sync as well as
when the downloads screen loads, so it happens even if the user doesn't open the app.

Expired prepared files (prepare_again). DownloadWorker treats every 409 from
the file route as "still preparing" because the old body carried no distinguishing
code. The server now answers 409 prepared_file_expired (problem type ends in
prepared_file_expired) when a finished entry's server copy was cleaned up. On that
code, call POST /api/v2/downloads/{id}/prepare, wait for ready (download event or
polling), then restart the transfer instead of entering the preparing backoff. A
revoked entry still answers a plain 409 conflict.

Contract: docs/downloads-api.md §3, §4.5, §4.12, §9.3, §11.4 in silo-server.

AI disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-drafted from the silo-server change; a maintainer approved filing it.
  • Adversarial review: n/a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions