pub enum Action {
Download {
clip: Clip,
lineage: LineageContext,
path: String,
format: AudioFormat,
},
Reformat {
clip: Clip,
path: String,
from_path: String,
from: AudioFormat,
to: AudioFormat,
},
Retag {
clip: Clip,
lineage: LineageContext,
path: String,
},
Rename {
from: String,
to: String,
},
Delete {
path: String,
clip_id: String,
},
Skip {
clip_id: String,
},
WriteArtifact {
kind: ArtifactKind,
path: String,
source_url: String,
hash: String,
owner_id: String,
content: Option<String>,
},
DeleteArtifact {
kind: ArtifactKind,
path: String,
owner_id: String,
},
}Expand description
One executable step in a Plan.
Variants§
Download
Download the clip to path in format (new, missing, or zero length).
Reformat
Render the clip to path in to, replacing the prior from rendering.
A format change always changes the file extension, so the prior file at
from_path is a different path that must be removed once the new file is
written; carrying it keeps the plan a full account of disk mutations.
Retag
Re-tag the existing file at path to match current metadata or art.
Rename
Move the file from one relative path to another.
Delete
Delete the local file for a clip that has left every mirror source.
Skip
Take no action for a clip; recorded so the plan is a full account.
WriteArtifact
Write (or rewrite) an external sidecar artifact for its owning clip.
Emitted when the manifest lacks the artifact or its stored hash differs
from hash. A write is additive and never gated by deletion safety.
content carries an inline body for generated artifacts (playlists):
when Some, the executor writes those exact bytes atomically and skips
the network entirely; when None, it fetches (and transcodes) from
source_url as before. A fetched artifact leaves source_url set and
content None; a generated one leaves source_url empty and content
Some.
Fields
kind: ArtifactKindDeleteArtifact
Delete an external sidecar artifact (a removed kind, or a co-deleted sidecar of a clip whose audio is being deleted).
Only ever emitted through [delete_artifact_action], which shares the
audio can_delete gate and the owning entry’s preserve marker, so a
sidecar is never removed on an incomplete listing or for a preserved clip.