Skip to content
Client
Server

Reference / @open-music-sdk/types / tLibrarySongAttributes

Interface: tLibrarySongAttributes ​

Defined in: library-song.ts:23

The attributes for a library song resource.

Properties ​

albumName? ​

ts
optional albumName?: string;

Defined in: library-song.ts:25

The name of the album the song appears on.


artistName ​

ts
artistName: string;

Defined in: library-song.ts:27

The artist’s name.


artwork ​

ts
artwork: tArtwork;

Defined in: library-song.ts:29

The album artwork.


contentRating? ​

ts
optional contentRating?: "clean" | "explicit";

Defined in: library-song.ts:31

The Recording Industry Association of America (RIAA) rating of the content. The possible values for this rating are clean and explicit. No value means no rating.


discNumber? ​

ts
optional discNumber?: number;

Defined in: library-song.ts:33

The disc number the song appears on.


durationInMillis ​

ts
durationInMillis: number;

Defined in: library-song.ts:35

The approximate length of the song in milliseconds.


genreNames ​

ts
genreNames: string[];

Defined in: library-song.ts:37

The genre names the song is associated with.


hasLyrics ​

ts
hasLyrics: boolean;

Defined in: library-song.ts:39

Indicates if the song has lyrics available in the Apple Music catalog. If true, the song has lyrics available; otherwise, it doesn’t.


inFavorites? ​

ts
optional inFavorites?: boolean;

Defined in: library-song.ts:41

Whether the catalog resource ID is in the person’s favorites.


name ​

ts
name: string;

Defined in: library-song.ts:43

The localized name of the song.


playParams? ​

ts
optional playParams?: tPlayParameters;

Defined in: library-song.ts:45

When present, this attribute indicates that the song is available to play. The value map may be used to initiate playback.


releaseDate? ​

ts
optional releaseDate?: string;

Defined in: library-song.ts:47

The release date of the song, when known, in YYYY-MM-DD or YYYY format. Prerelease songs may have an expected release date in the future.


trackNumber? ​

ts
optional trackNumber?: number;

Defined in: library-song.ts:49

The number of the song in the album’s track list.

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