Titleformat API
English API reference for the titleformat family.
This page is the primary owner for the namespaces listed below. Method names, parameter keys, and return fields follow the C++ RegisterApi handlers.
titleformat
titleformat.eval
Public API method. Runtime authority: src/api/TitleformatApi.cpp:401.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | No | Optional; default . |
pattern | string | No | Optional; default . |
Returns: {"error":"...","path":"...","pattern":"...","result":"...","success":true}
const result = await fb2k.invoke('titleformat.eval', { path: /* value */, pattern: /* value */ });titleformat.evalBatch
Public API method. Runtime authority: src/api/TitleformatApi.cpp:402.
| Parameter | Type | Required | Description |
|---|---|---|---|
paths | array | Yes | Required. |
pattern | string | No | Optional; default . |
Returns: {"error":"...","errorCount":"...","pattern":"...","results":"...","success":true,"successCount":"...","total":"..."}
const result = await fb2k.invoke('titleformat.evalBatch', { paths: /* value */, pattern: /* value */ });titleformat.evalFields
Public API method. Runtime authority: src/api/TitleformatApi.cpp:403.
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | object | Yes | Required. |
path | string | No | Optional; default . |
Returns: {"error":"...","path":"...","success":true}
const result = await fb2k.invoke('titleformat.evalFields', { fields: /* value */, path: /* value */ });titleformat.evalFieldsBatch
Public API method. Runtime authority: src/api/TitleformatApi.cpp:404.
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | object | Yes | Required. |
paths | array | Yes | Required. |
Returns: {"error":"...","errorCount":"...","results":"...","success":true,"successCount":"...","total":"..."}
const result = await fb2k.invoke('titleformat.evalFieldsBatch', { fields: /* value */, paths: /* value */ });titleformat.getBuiltinFields
Public API method. Runtime authority: src/api/TitleformatApi.cpp:405.
No parameters.
Returns: {"fields":[],"success":true}
const result = await fb2k.invoke('titleformat.getBuiltinFields');Evaluation semantics
titleformat.evalrequires a non-emptypathandpattern. Invalid patterns and unavailable files returnsuccess: falsewitherror.titleformat.evalBatchrequires an arraypathsand a non-emptypattern; per-item failures are retained inresults, whilesuccessCountanderrorCountsummarize the batch.titleformat.evalFieldsandtitleformat.evalFieldsBatchrequire an objectfields. Each key becomes a response property; non-string field expressions are returned asnullfor that key.titleformat.getBuiltinFieldsis a convenience reference generated by the runtime. It does not guarantee that optional component fields such as play-count data are populated for every installation or track.