Function read_current

Source
pub fn read_current(
    source: CurrentTrack<'_>,
) -> Result<Option<Lyrics>, ReadError>
Expand description

Read a complete local lyrics answer after confirming its current audio identity.

Tag lyrics take precedence; an empty tag falls back to the catalogued .lrc. With neither source, the answer is Ok(None). Empty/metadata-only lyrics also return None. This function never fetches or writes anything.

Input text is limited to 256 KiB, complete decoded/expanded text to 1 MiB. Unlike super::read, excessive input and timestamp expansion are explicit errors rather than a prefix or an unsynchronized fallback. Invalid UTF-8 is replaced consistently with the ordinary sidecar reader. Audio and sidecar descriptors, paths and precise timestamps are checked before publication; this detects ordinary replacement races but cannot eliminate every concurrent ancestor-directory change through pathname-based standard-library APIs.