Utilities for Service Discovery scripts.

Availability

Script Types
Services Discovery

Service Discovery Items

Items are the media elements provided by the service.

add_item()

Adds an item to the root of the service panel.

Usage

local song_path = vlc.strings.make_uri("/path/to/local/mp3/file.mp3")
local song_item = vlc.sd.add_item({path=song_path, title="Cool song", genre="The best genre"})

Parameters

Return value

An item object


Item Setters

Each variable relating to an item’s metadata settable via a function call. Each function’s name conforms to the template item:set_name(value), where “value” is a string containing the value to assign and “name” is the name of the metadata to set.

Example

local itm = vlc.sd.add_item({path=some_path, title="My Item"})
itm:set_language("French")

Item Metadata

Items can have values assigned to the following metadata fields:


Service Discovery Nodes

Nodes can be thought of as folder/directories/playlists. Each child of a node can be either an item or another node.
Each node has the following fields:

add_node()

Add a node to the root of the service panel.

Parameters

Return value

A node object


node:add_subitem()

Add a child item to a node.

Parameters

Return value

An item object


node:add_subnode()

Add a child node to a node.

Parameters

Return value

A node object