OptionalexpectedExpected content version for optimistic concurrency control. When mismatched, mutations are aborted with STALE_TARGET (details.current carries current version). Omitted, no check is made.
OptionalitemsPlaylist rows; the entries they produce carry that position, so the playback cursor follows them. At most max(256, current queue length) entries; more fail with INVALID_PARAMS.
OptionalpathsFile paths or URLs, each optionally with a |subsong:N suffix. The entries they produce carry no playlist position.
OptionalpositionWhere to insert, counted after any moved entries are taken out; 0 is the front.
Parameters for
queue.insertNext. Insert tracks so they play next, ahead of everything already queued. A track that is already queued is moved instead of queued twice.itemsland beforepaths; each block keeps its own order. A call with neitherpathsnoritemsfails withINVALID_PARAMS. Every entry ofitemsis checked before any path is resolved, and one bad entry fails the whole call with nothing written: an entry naming its playlist by neither or both ofplaylistandplaylistGuid, or by a malformed GUID, fails withINVALID_PARAMS, a GUID no playlist has withNOT_FOUND, a playlist index or row out of range withINVALID_INDEX. A path the media-root check refuses fails the whole call withPERMISSION_DENIED; a path that resolves to nothing is dropped and counted ininvalidCount, and when nothing at all is left to insert the call fails withNOT_FOUND. A playlist row that changed while the paths were resolved fails the call withOPERATION_FAILED, and so does a queue that cannot be rebuilt.expectedVersionis compared when the queue is written, after the paths are resolved.