Manage playlists
manage-playlistsCreate, update, delete, or describe playlists in Foundry VTT, handling tracks, settings, and permission checks.
Instructions
Describe, create, update or delete playlists. describe without playlist lists every playlist (like list-playlists); with playlist it returns that one with its tracks, and a unique part of the name is enough there. create checks every track first and creates the playlist with all tracks in one step. update changes fields of the playlist and of existing tracks; adding or removing tracks is not part of it. delete works by playlist id only, is refused while a scene still uses the playlist, and needs the playlist permission "create, change and delete". For changes a playlist is found by id or exact name (case ignored when unique), never by a part of the name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fade | No | Crossfade in milliseconds. | |
| mode | No | -1 disabled, 0 in order, 1 shuffled, 2 all at once (ambience). | |
| name | No | Name of the new playlist (create, required) or the new name (update). | |
| color | No | Colour as text, or null. When Foundry does not keep it, the result says so. | |
| action | Yes | What to do. | |
| folder | No | Id of a playlist folder, or null for the top level. A name is not accepted. | |
| sounds | No | Tracks to create, or to change with update. | |
| channel | No | Audio channel of the playlist. | |
| sorting | No | "a" alphabetical, "m" manual. | |
| updates | No | More playlist fields for update. A parameter of the same name wins; known fields are checked alike. | |
| playlist | No | Id or name for describe and update, id for delete. Null with describe lists all. | |
| description | No | Description of the playlist. |