pub struct TrackMetadata {Show 20 fields
pub title: String,
pub artist: String,
pub album: String,
pub album_artist: String,
pub date: String,
pub year: String,
pub lyrics: String,
pub prompt: String,
pub comment: String,
pub style: String,
pub style_summary: String,
pub model: String,
pub handle: String,
pub parent: String,
pub root: String,
pub lineage: String,
pub id: String,
pub url: String,
pub track: u32,
pub track_total: u32,
}Expand description
The metadata tags written into a downloaded audio file.
Fields§
§title: String§artist: String§album: String§album_artist: String§date: String§year: StringThe album’s release year (YYYY): the lineage root’s creation year, or
the clip’s own year when the root’s is unavailable.
lyrics: String§prompt: String§comment: String§style: String§style_summary: String§model: String§handle: String§parent: String§root: String§lineage: String§id: StringThe clip’s own Suno id, embedded as SUNO_ID.
url: StringThe canonical https://suno.com/song/<id> page URL, embedded as
SUNO_URL. Empty when the clip has no id.
track: u32This track’s 1-based position within its lineage album, or 0 when
unnumbered. Written as TRACKNUMBER/TRCK/trkn.
track_total: u32The album’s track count paired with track, or 0 when
unnumbered.
Implementations§
Source§impl TrackMetadata
impl TrackMetadata
Sourcepub fn from_clip(clip: &Clip, lineage: &LineageContext) -> TrackMetadata
pub fn from_clip(clip: &Clip, lineage: &LineageContext) -> TrackMetadata
Map a Clip plus its resolved LineageContext to its tag set,
mirroring ha-suno’s to_track_metadata.
artist and album_artist fall back to "Suno", and date is the
YYYY-MM-DD prefix of created_at. year is the lineage root’s
creation year (the clip’s own year when the root’s is unavailable), so an
album whose tracks cross a calendar boundary groups under one year. The
album, parent, root, and lineage tags come from the resolved
context, not the clip’s own edited_clip_id pointer, and the generation
prompt is preserved in its own SUNO_PROMPT tag.
Trait Implementations§
Source§impl Clone for TrackMetadata
impl Clone for TrackMetadata
Source§fn clone(&self) -> TrackMetadata
fn clone(&self) -> TrackMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrackMetadata
impl Debug for TrackMetadata
Source§impl Default for TrackMetadata
impl Default for TrackMetadata
Source§fn default() -> TrackMetadata
fn default() -> TrackMetadata
impl Eq for TrackMetadata
Source§impl Hash for TrackMetadata
impl Hash for TrackMetadata
Source§impl PartialEq for TrackMetadata
impl PartialEq for TrackMetadata
Source§fn eq(&self, other: &TrackMetadata) -> bool
fn eq(&self, other: &TrackMetadata) -> bool
self and other values to be equal, and is used by ==.