Repository navigation
Mark downloaded episodes that were removed from their feed #21
Copy link
Copy link
Open
Description
Summary
A downloaded episode that has dropped out of its feed is never marked "Removed from feed". The feature spec says a de-listed episode is marked, and stays playable if its file is still on the device. Today those two can't both be true, because "removed from feed" and "downloaded" are values of the same field (download_status).
Raised by a review bot on PR #18 (feed refresh). The behaviour is deliberate there and documented, so it isn't a regression, but it falls short of the spec.
Current behaviour
- An episode that stays absent from its feed for 48 hours of wall time is flagged
RemovedFromFeed(see "De-listed Episodes" indocs/features/subscription.md). - Only
NotDownloadedandFailedrows are flagged (flagEpisodesRemovedFromFeediniOS/Pollux/DatabaseManagerRows.swift). SettingRemovedFromFeedon aDownloaded,QueuedorDownloadingrow would overwrite that status. A downloaded file would be orphaned and no longer playable, and an in-flight download would lose its state. - So a downloaded or in-flight de-listed episode looks like any other episode. The miss clock (
missing_since) keeps running in storage, and if the file is later deleted the next refresh flags it. The core never seesmissing_since.
Proposal
Model feed availability separately from download state, so an episode can be both Downloaded and no longer in its feed.
- Add an availability field to the episode (for example
available_in_feed: bool, or an enum if more states are expected), set from the miss-clock rule. - Stop using
RemovedFromFeedas adownload_statusvalue, or keep it only as a migration aid. The download state machine then stays about downloads only. - Carry the field through the schema (
episodes), theEpisodetype, typegen, the view model and the row and detail UI (a "Removed from feed" label that coexists with "Downloaded"). - Apply the flag to every episode that has been missing for the grace period, regardless of download state. A reappearing episode clears it.
Related work
- The spec's "hide removed episodes from the default view" and "Show unavailable episodes" toggle are not built (
docs/features/subscription.md, "De-listed Episodes"). They need the same availability signal, so this is best designed together with them. - The 48-hour rule and the clock skew handling stay as they are; only where the result is stored changes.
Notes
- Until the first release the schema is a single baseline edited in place (
iOS/Pollux/DatabaseMigrations.swift), so adding a column now needs no migration. - Files:
iOS/Pollux/DatabaseManagerRows.swift,iOS/Pollux/DatabaseMigrations.swift,shared/src/domain/episode.rs,shared/src/view_model.rs,docs/features/episode.md,docs/features/subscription.md,docs/DATA_MODEL.md.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity