Reference / @open-music-sdk/lib-playlists / tPlaylistPlan
Interface: tPlaylistPlan
Defined in: lib/lib-playlists/src/plan.ts:63
What plan gives: the tracks a playlist is to hold, and what that takes. Plain, and frozen all the way down: it holds nothing of the caller's that could change under it, and can be written to a file and applied later.
Properties
append
readonly append: readonly tLibraryPlaylistTracksRequestData[];Defined in: lib/lib-playlists/src/plan.ts:78
The ones it does not hold yet, in order: what apply adds to its end. A wanted track is held when one of the playlist's tracks has its id, as its catalogId or as its own id. Each track of the playlist answers for one wanted track at most, so a song wanted twice and held once is added once more.
extra
readonly extra: readonly tPlaylistSnapshotTrack[];Defined in: lib/lib-playlists/src/plan.ts:80
The tracks it holds that are not wanted. Apple's API cannot take a track out, so they stay.
playlist
readonly playlist:
| tNewPlaylist
| {
id: string;
};Defined in: lib/lib-playlists/src/plan.ts:65
The playlist the plan is for: by its id, or by the name and description of one to find or make.
Union Members
Type Literal
{
id: string;
}id
readonly id: string;The id in the listener's library of a playlist that is there.
reordered
readonly reordered: boolean;Defined in: lib/lib-playlists/src/plan.ts:86
Whether the playlist, once what is missing is added, will hold the wanted tracks in another order than wanted: because it holds some of them in another order already, or because a track to add belongs before one it holds and can only go after it. Apple's API cannot move a track, or put one anywhere but at the end.
tracks
readonly tracks: readonly tLibraryPlaylistTracksRequestData[];Defined in: lib/lib-playlists/src/plan.ts:72
The tracks the playlist is to hold, each as { id, type }, in order.