30817:music-playlists
What ChadF and 33 others's copy changes
The document signed by Karnage, read whole, with what the copy signed by ChadF and 33 others changes marked in place.
Music Playlists
draft optional
This spec defines an addressable event kind for publishing music playlists on Nostr.Nostr, with tracks referenced via Podcast Index GUIDs.
Event Kind
34139: Playlist(addressable)(parameterized replaceable per NIP-33)
Playlist Event
A playlist is an addressable event containing an ordered list of music tracks.
Format
The .content field MAY contain a description of the playlist in plain text or Markdown.
The .content field SHOULD contain a Markdown track listing as a human-readable fallback:
# Playlist Title
Artist One - Track Title
Artist Two - Track Title
N tracks
The i tags are the canonical track references. The .content listing allows clients to display the playlist even when feed resolution is unavailable.
Tags
Required:
d- Unique identifier for this playlisttitle- Playlist titlealt- Human-readable description (NIP-31)
Optional:
description- Short description (can also use content field)image- URL to playlist artwork- Track and feed referencesaiin(multiple,formatordered—36787:<pubkey>:<d-tag>(multiple,seeordered)below)t- Category tags for discoverypublic- Set to"true"for public playlists (default)private- Set to"true"for private playlistscollaborative- Set to"true"to allow others to add tracks
Example
{
"kind": 34139,
"content": "My favorite summer vibes from 2024",
"tags": [
["d", "summer-vibes-2024"],
["title", "Summer Vibes 2024"],
["image", "https://cdn.blossom.example/img/playlist.jpg"],
["description", "Chill electronic tracks for summer"],
["a", "36787:abc123...:summer-nights-2024"],
["a", "36787:def456...:sunset-dreams"],
["a", "36787:abc123...:ocean-breeze"],
["t", "playlist"],
["t", "electronic"],
["t", "summer"],
["public", "true"],
["alt", "Playlist: Summer Vibes 2024"]
]
}
{
"id": "<32-byte hex event id>",
"pubkey": "<32-byte hex public key>",
"created_at": 1700000000,
"kind": 34139,
"content": "# Summer Vibes 2024\n\nSurvival Guide - January Shock\nJune & The Jets - You Sure Did\nBear's Snare - Ocean Breeze\n\n3 tracks",
"tags": [
["d", "summer-vibes-2024"],
["title", "Summer Vibes 2024"],
["alt", "Music playlist: Summer Vibes 2024"],
["t", "playlist"],
["t", "music"],
["public", "true"],
["image", "https://cdn.blossom.example/img/playlist.jpg"],
["i", "podcast:item:guid:a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
["i", "podcast:item:guid:b2c3d4e5-f6a7-8901-bcde-f12345678901"],
["i", "podcast:item:guid:c3d4e5f6-a7b8-9012-cdef-012345678902"],
["i", "podcast:guid:d7b4abee-1234-5678-9abc-def012345678"],
["i", "podcast:guid:e8c5bcff-2345-6789-abcd-ef0123456789"]
],
"sig": "<64-byte hex signature>"
}
Track References
Playlists reference music tracks using tags aiinwith prefixes from the format:Podcasting 2.0 namespace:
["a",["i", "36787:"podcast:item:guid:<pubkey>:itemGuid>"]
["i", "podcast:guid:<d-tag>"]feedGuid>"]
Where:
36787is the Music Track event kind (see NIP-XX: Music Tracks)<pubkey>is the track author's public key (hex)<d-tag>is the track's unique identifier
podcast:item:guidreferences a specific track by its RSS<guid>element value. One tag per track, in playlist order.podcast:guidreferences the feed containing one or more tracks, by the feed's<podcast:guid>element value. Deduplicated — one tag per unique feed.
Item GUID tags MUST appear in playlist order. Feed GUID tags MAY appear in any order and MAY be interleaved with item tags or grouped separately.
The mapping between items and feeds is implicit. Clients resolve all feed GUIDs, parse each feed, and search across them to match each item GUID.
Clients resolve tracks by:
- Collecting
podcast:guidvalues fromitags - Looking up feed URLs via the Podcast Index API
podcasts/byguidendpoint (requires API key + secret) - Fetching and parsing each feed's RSS XML
- Matching each
podcast:item:guidacross all parsed feeds - Falling back to the
.contenttrack listing for unresolved items
naddr1qvzqqqy9tvpzpauj9g9dk0aymkj7aj4x9ahhaes4nal4tcyqxe5xc68qswpvx3ugqyt8wumn8ghj7cmgv9jxvtnwdaehgu339e3k7mgpzamhxue69uhkv6tvw3jhytnwdaehgu3wwa5kuegpzpmhxue69uhkummnw3ezuamfdejsq9tnw3skymr9ddexzen594nxzan0wf5hgetnnkkw8h
Implementation Notes
- Playlists are updatable (addressable
events) Playlistevents — re-publishing with the sameadtagstagreferencereplacestrackstheinpreviousdisplay orderversion)Clientsitag order is canonical; clients SHOULD preserve track order when displayingplaylists- Clients SHOULD handle missing/deleted tracks gracefully — show a placeholder from
.contentor skip - When a
referencedfeedtrackcannotisbenotresolvedfound,(deadclientsURL,MAYremovedshowfromaindex),placeholderclientsorMAYskipshowit PlayliststhesupportcorrespondingNIP-25.contentreactionslineand NIP-22 commentsinstead- Use
naddridentifiers to link to playlists CollaborativePlaylistsplaylistsupportmechanicsNIP-25arereactionsclient-definedand(e.g.,NIP-22NIP-04/17 track suggestions)comments- Artwork images SHOULD be hosted on Blossom servers for permanence
- Resolved feeds may contain
<podcast:value>tags — clients MAY parse these to enable Lightning payments and boosts