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,
},
WriteStem {
clip_id: String,
key: String,
stem_id: String,
path: String,
source_url: String,
format: StemFormat,
hash: String,
},
DeleteStem {
clip_id: String,
key: String,
path: 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.
WriteStem
Write (or rewrite) one stem file for its owning clip.
Emitted when the clip’s manifest stem map lacks this key, or its stored
hash or path drifts (the song moved, or the stem format changed). A write
is additive and never gated by deletion safety. Stems are stored RAW in
their native container and never transcoded to FLAC: a Wav stem is
rendered through the free convert_wav flow keyed on stem_id, an Mp3
stem is fetched straight from source_url. key is the stable stem key,
so the executor updates the right slot in the clip’s keyed stem map.
Fields
format: StemFormatDeleteStem
Delete one stem file and clear its slot in the clip’s keyed stem map.
Only ever emitted through [delete_stem_action], which shares the audio
can_delete gate and the owning entry’s preserve marker, so a stem is
never removed on an incomplete listing or for a preserved clip. Emitted
either when an AUTHORITATIVE stem listing no longer contains key, or as
a co-delete when the owning clip’s audio is deleted (so the .stems
folder is never orphaned).