Skip to content

Shared Types ​

Shapes that several namespaces return. A method's own return table links here instead of repeating the fields.

Track ​

One track, as every method whose declaration returns whole rows reports it: the playing track, a media library row, a playlist row, a queue entry. Containers add their own fields (a row number, a queue position) on top of these.

FieldTypeDescription
handlestringThe key that identifies the track across endpoints: absolutePath, with a |subsong:N suffix when subsong is not 0. The same track yields the same handle from every such method; because of the suffix it is not a plain file path, and a method that takes a path documents whether it accepts one.
pathstringPath as foobar2000 stores it: file:// for a local file, file-relative:// for a path stored relative to the foobar2000 folder (a portable install), or a remote URL. No subsong suffix.
absolutePathstringNative filesystem path without the subsong suffix; the same as path for a remote URL.
subsongintegerSubsong identifier the decoder assigns inside the file, not necessarily a sequence number; 0 for a whole file and for a remote stream.
titlestringFirst TITLE value; empty when untagged.
artiststringEvery ARTIST value joined with ", "; empty when untagged.
artistsstring[]Every ARTIST value in tag order; empty when untagged.
albumstringFirst ALBUM value; empty when untagged.
albumArtiststringEvery ALBUM ARTIST value joined with ", "; empty when untagged.
albumArtistsstring[]Every ALBUM ARTIST value in tag order, so albumArtists.join(", ") equals albumArtist; empty when untagged. library.getAlbums files a track that has an album under the name album and the album artist albumArtists[0], or artists[0] when this array is empty ("" when both are); those are the name and albumArtist of that album's row.
genrestringEvery GENRE value joined with ", "; empty when untagged.
datestringFirst DATE value as tagged, such as 2019 or 2019-05-01; empty when untagged.
trackNumberintegerTRACKNUMBER read as an integer; 0 when absent or not a number.
discNumberintegerDISCNUMBER read as an integer; 0 when absent or not a number.
durationnumberLength in seconds; 0 when unknown.
fileSizeintegerFile size in bytes; -1 when unknown, as for a remote stream.
bitrateintegerAverage bitrate in kbit/s; 0 when unknown.
sampleRateintegerSample rate in Hz; 0 when unknown.
channelsintegerChannel count; 0 when unknown.
codecstringCodec name as the decoder reports it, such as FLAC or MP3; empty when unknown.
ratingintegerRating from 0 to 5: the %rating% statistic (foo_playcount) when it is 1 to 5, otherwise the RATING tag clamped to that range; 0 when neither rates the track.

TrackPartial ​

A track projected down to the fields a caller asked for.

Every field of Track, each optional.

SystemApiInfo ​

One registered method.

FieldTypeDescription
fullNamestringFull method name, namespace.method.
pluginstringDisplay name of the owning plugin; foo_ui_webview2 for built-in methods.
namespacestringNamespace part of the name.
methodstringMethod part of the name.
descriptionstringDescription given at registration; empty when none.
versionstringVersion given at registration.
isExternalbooleantrue when an external plugin registered it.

SystemPluginInfo ​

One registered external plugin.

FieldTypeDescription
namestringDisplay name.
namespacestringNamespace the plugin owns; unique among plugins.
versionstringPlugin version.
authorstringAuthor.
descriptionstringDescription.
apiCountintegerNumber of entries in apis.
apisstring[]Full names of the methods the plugin registered.