Keep your copy in step
List removals as often as you sync, withsince set to the as_of of your previous sync, and read every page by passing back each cursor until has_more is false. Then store the as_of for next time. Every page of one walk carries the same as_of, set when its first page was read, so a walk can pause and resume as late as you like without missing anything.
- A
podcastremoval takes the show and every episode it had. Delete everything you hold for itspodcast.id, which is thepodcast.idon every episode we deliver.episode_countcounts the episodes removed with it, andtranscribed_episode_countcounts the ones with a transcript, which are the ones the archive and the stream delivered. - An
episoderemoval takes one episode of a show that remains. Itsepisode.idis the episode’sid. - Removals are oldest first. Every removal up to
as_ofis listed. Removals after it can be listed too, and are listed again on your next sync, so apply each one idempotently: deleting something already deleted is harmless.
as_of as since, so one checkpoint drives both. Apply removals after loading the days the archive lists. A removal can be listed before the archive’s daily update that drops its episodes from their days, so loading an older copy of a day afterwards would bring them back until that update.
Which episodes left with a show
Passinclude=episodes to list the episodes each removed show took with it, with each one’s id, title, published_at and has_transcript. The UTC date of published_at is the archive day the episode left, so this tells you which episodes dropped out of which day without comparing files.
Reasons
What isn’t a removal
- An episode whose publication date changed moves to another day of the archive. It is still in the catalog, so it isn’t listed here.
- A show we restore drops out of this list and comes back: in the archive’s next update, and in the stream and the feed as its new episodes arrive.