foo-webview-sdk
    Preparing search index...

    Interface LyricsSaveParams

    Parameters for lyrics.save. Save lyrics to a sidecar file, an embedded tag, or both. A file save invalidates the read cache; an embedded save dispatches an asynchronous write and metadata changes invalidate the cache. Without filename, verified single-track files use the audio stem; other tracks use <first artist> - <title>. Missing tags in the latter case fail that target with INVALID_PARAMS. Existing files are overwritten, so use distinct filenames when tracks have the same artist and title. With one target the result describes that write; with several, each outcome is under results and OPERATION_FAILED means all failed.

    interface LyricsSaveParams {
        filename?: string;
        format?: "lrc" | "txt";
        lyrics: string;
        path: string;
        tagName?: string;
        target?: string[];
    }
    Index
    filename?: string

    Exact file name, including any extension, for the file target. A non-empty value replaces the derived name and ignores format; empty means the default name. The same Windows filename rules and INVALID_PARAMS failure as lyrics.get apply.

    format?: "lrc" | "txt"

    Extension for the default sidecar name; ignored when filename is non-empty.

    "lrc"
    
    lyrics: string

    Lyrics text to save.

    path: string

    Track path the lyrics belong to; a |subsong:N suffix selects a subsong.

    tagName?: string

    Tag the embedded target writes.

    "LYRICS"
    
    target?: string[]

    Where to write: file (a sidecar next to the audio file), embedded (a tag in the file), or all for both; several entries write to each. Any other value fails with INVALID_PARAMS. Omitted means file.