getplaylist
Retrieve the items and current position from the active player's playlist or a named one (audio/video/picture) without altering the queue.
Instructions
Read the queue without changing it: the items of the active player's playlist — or of a named one (audio/video/picture), which always wins — plus the position of the now-playing item. An empty queue is an empty list. Returns { "type"?, "total", "position"?, "items": [ { "id", "file", "label", "type" } ] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | Target Kodi instance. Omitted uses the default ("(null)"). | |
| type | No | Which playlist to read. Always wins when provided — reads that playlist even while another plays, the only way to inspect an inactive queue. Omitted reads the active player's playlist. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | The playlist read, when one was resolved. | |
| total | Yes | Number of queued items. | |
| position | No | Index of the now-playing item — present only when the playlist read is the active player's own. | |
| items | Yes | The queued items, in playback order. |