Skip to content
Client
Server

Reference / @open-music-sdk/lib-playlists / tPlaylistSnapshotTrack

Interface: tPlaylistSnapshotTrack ​

Defined in: lib/lib-playlists/src/plan.ts:14

A track of a playlist as read gives it. Plain JSON, and the same fields a track is described by to resolve, so a playlist that was read can be written to a file and resolved again from it, for another listener or another service. Every field but the first two is there when Apple gave it.

Properties ​

albumName? ​

ts
readonly optional albumName?: string;

Defined in: lib/lib-playlists/src/plan.ts:28

The album it is on.


artistName? ​

ts
readonly optional artistName?: string;

Defined in: lib/lib-playlists/src/plan.ts:26

Who performs it.


catalogId? ​

ts
readonly optional catalogId?: string;

Defined in: lib/lib-playlists/src/plan.ts:20

The id of the same track in the catalog, where the library knows of one. A track the listener uploaded has none.


durationInMillis? ​

ts
readonly optional durationInMillis?: number;

Defined in: lib/lib-playlists/src/plan.ts:30

How long it is, in milliseconds.


id ​

ts
readonly id: string;

Defined in: lib/lib-playlists/src/plan.ts:16

The track's id in the listener's library.


isrc? ​

ts
readonly optional isrc?: string;

Defined in: lib/lib-playlists/src/plan.ts:22

The recording's ISRC, from the catalog.


name? ​

ts
readonly optional name?: string;

Defined in: lib/lib-playlists/src/plan.ts:24

The track's title.


type ​

ts
readonly type: "library-songs" | "library-music-videos";

Defined in: lib/lib-playlists/src/plan.ts:18

What kind of track it is: the two kinds Apple documents a playlist of a library as holding.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.