Lyrics API
English API reference for the lyrics family.
This page is the primary owner for the namespaces listed below. Method names, parameter keys, and return fields follow the C++ RegisterApi handlers.
lyrics
lyrics.exists
Public API method. Runtime authority: src/api/LyricsApi.cpp:625.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | No | Optional; default . |
Returns: {"error":"...","exists":"...","sources":"...","success":true}
js
const result = await fb2k.invoke('lyrics.exists', { path: /* value */ });lyrics.get
Public API method. Runtime authority: src/api/LyricsApi.cpp:619.
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | No | Optional; default any. |
path | string | No | Optional; default . |
source | string | No | Optional; default any. |
type | string | No | Optional; default any. |
Returns: {"available":true,"lyrics":"...","path":"...","source":"...","sourcePath":"...","success":true,"synced":"..."}
js
const result = await fb2k.invoke('lyrics.get', { format: /* value */, path: /* value */, source: /* value */, type: /* value */ });lyrics.save
Public API method. Runtime authority: src/api/LyricsApi.cpp:622.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename | string | No | Optional; default . |
format | string | No | Optional; default lrc. |
lyrics | string | No | Optional; default . |
path | string | No | Optional; default . |
tagName | string | No | Optional; default LYRICS. |
target | array | No | Optional; default file. |
Returns: {"error":"...","results":"...","success":true}
js
const result = await fb2k.invoke('lyrics.save', { filename: /* value */, format: /* value */, lyrics: /* value */, path: /* value */, tagName: /* value */, target: /* value */ });Contract notes
lyrics.getusespathwhen supplied and otherwise resolves the current playing track.source,type, andformatdefault toany; successful results includesuccess,available, andpath, plussource,lyrics, andsyncedwhen lyrics are found. File-backed results additionally includesourcePath.- For a
path|subsong:Ncontainer path, file lookup checks the per-track sidecar before the shared sidecar.lyrics.existsreturns source labels such asfile:song.lrcand never treats a missingpathas a current-track request. lyrics.saverequires bothpathand non-emptylyrics.targetdefaults tofileand acceptsfile,embedded,config,all, or an array of the first three values. Thefilenamevalue must be a plain filename; path separators and traversal sequences are rejected.- The documented SDK helpers
fb.lyrics.get(...),fb.lyrics.exists(...), andfb.lyrics.save(...)are convenience wrappers. The public Bridge contract on this page remains the threelyrics.*methods. The<fb-lyrics-panel>component is a consumer, not a registered API method.