30817:music-playlists-with-pc-20-guids

What Karnage's copy changes

The document signed by ChadF and 33 others, read whole, with what the copy signed by Karnage changes marked in place.

only in Karnage'sonly in ChadF and 33 others'ssharing 44% of their wordsSwap sides

Music Playlists

draft optional

This spec defines an addressable event kind for publishing music playlists on Nostr, with tracks referenced via Podcast Index GUIDs.Nostr.

Event Kind

  • 34139: Playlist (parameterized replaceable per NIP-33)(addressable)

Playlist Event

A playlist is an addressable event containing an ordered list of music tracks.

Format

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.

The .content field MAY contain a description of the playlist in plain text or Markdown.

Tags

Required:

  • d - Unique identifier for this playlist
  • title - Playlist title
  • alt - Human-readable description (NIP-31)

Optional:

  • description - Short description (can also use content field)
  • image - URL to playlist artwork
  • ia - Track and feed references (multiple,in orderedformat —36787:<pubkey>:<d-tag> see(multiple, below)ordered)
  • t - Category tags for discovery
  • public - Set to "true" for public playlists (default)
  • private - Set to "true" for private playlists
  • collaborative - Set to "true" to allow others to add tracks

Example

{
  "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>"
}
{
  "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"]
  ]
}

Track References

Playlists reference music tracks using ia tags within prefixes from the Podcasting 2.0 namespace:format:

["i",["a", "podcast:item:guid:"36787:<itemGuid>"]
["i", "podcast:guid:pubkey>:<feedGuid>"]d-tag>"]

Where:

  • podcast:item:guid references a specific track by its RSS <guid> element value. One tag per track, in playlist order.
  • podcast:guid references 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.

Resolution

Clients resolve tracks by:

  1. Collecting podcast:guid values from i tags
  2. Looking up feed URLs via the Podcast Index API podcasts/byguid endpoint (requires API key + secret)
  3. Fetching and parsing each feed's RSS XML
  4. Matching each podcast:item:guid across all parsed feeds
  5. Falling back to the .content track listing for unresolved items

Live Example

naddr1qvzqqqy9tvpzpauj9g9dk0aymkj7aj4x9ahhaes4nal4tcyqxe5xc68qswpvx3ugqyt8wumn8ghj7cmgv9jxvtnwdaehgu339e3k7mgpzamhxue69uhkv6tvw3jhytnwdaehgu3wwa5kuegpzpmhxue69uhkummnw3ezuamfdejsq9tnw3skymr9ddexzen594nxzan0wf5hgetnnkkw8h
  • 36787 is 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

Implementation Notes

  • Playlists are updatable (addressable eventsevents)
  • Playlist — re-publishing with the same da tagtags replacesreference thetracks previousin version)display order
  • iClients tag order is canonical; clients SHOULD preserve track order when displaying playlists
  • Clients SHOULD handle missing/deleted tracks gracefully — show a placeholder from .content or skip
  • When a feedreferenced cannottrack beis resolvednot (deadfound, URL,clients removedMAY fromshow index),a clientsplaceholder MAYor showskip theit
  • Playlists correspondingsupport .contentNIP-25 linereactions insteadand NIP-22 comments
  • Use naddr identifiers to link to playlists
  • PlaylistsCollaborative supportplaylist NIP-25mechanics reactionsare andclient-defined NIP-22(e.g., commentsNIP-04/17 track suggestions)
  • 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