# app.rocksky.playlist.song

> Published by [rocksky.app](https://lexicon.garden/identity/did:plc:vegqomyce4ssoqs7zwqvgqty)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:vegqomyce4ssoqs7zwqvgqty/app.rocksky.playlist.song)
- [Documentation](https://lexicon.garden/lexicon/did:plc:vegqomyce4ssoqs7zwqvgqty/app.rocksky.playlist.song/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:vegqomyce4ssoqs7zwqvgqty/app.rocksky.playlist.song/examples)

## Definitions

### `app.rocksky.playlist.song`

**Type**: `record`

A song entry in a playlist. Holds a strong reference to the playlist it belongs to, a strong reference to the song record itself, and a denormalized copy of the song metadata so the entry can be rendered without dereferencing the song.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `addedAt` | `string` (datetime) | Yes | The date and time the song was added to the playlist. |
| `album` | `string` | Yes | The album the song belongs to. |
| `albumArtUrl` | `string` (uri) | No | The URL of the album art of the song. |
| `albumArtist` | `string` | Yes | The album artist of the song. |
| `artist` | `string` | Yes | The artist of the song. |
| `duration` | `integer` | Yes | The duration of the song in milliseconds. |
| `playlist` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference (AT-URI + CID) to the parent app.rocksky.playlist record. |
| `song` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference (AT-URI + CID) to the app.rocksky.song record this entry points at. |
| `title` | `string` | Yes | The title of the song. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A song entry in a playlist. Holds a strong reference to the playlist it belongs to, a strong reference to the song record itself, and a denormalized copy of the song metadata so the entry can be rendered without dereferencing the song.",
      "key": "tid",
      "record": {
        "properties": {
          "addedAt": {
            "description": "The date and time the song was added to the playlist.",
            "format": "datetime",
            "type": "string"
          },
          "album": {
            "description": "The album the song belongs to.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "albumArtUrl": {
            "description": "The URL of the album art of the song.",
            "format": "uri",
            "type": "string"
          },
          "albumArtist": {
            "description": "The album artist of the song.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "artist": {
            "description": "The artist of the song.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "duration": {
            "description": "The duration of the song in milliseconds.",
            "minimum": 1,
            "type": "integer"
          },
          "playlist": {
            "description": "Strong reference (AT-URI + CID) to the parent app.rocksky.playlist record.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "song": {
            "description": "Strong reference (AT-URI + CID) to the app.rocksky.song record this entry points at.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "title": {
            "description": "The title of the song.",
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "playlist",
          "song",
          "title",
          "artist",
          "album",
          "albumArtist",
          "duration",
          "addedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.rocksky.playlist.song",
  "lexicon": 1
}
```
