Skip to content

feat(vod): Download button on live.streaming /vod, paid on nixamp.com like /music (0.72.0) - #381

Merged
ralyodio merged 1 commit into
mainfrom
feat/vod-buy-download
Oct 22, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feat/vod-buy-download

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Anthony: "add a payment button to download on live.streaming for vod ... similar to nixamp.com/music".

  • Guide (src/guide-vods.ts): a VOD may carry priceCents. Only the guide owner sets it, only on its own VODs, only for basis owned or public-domain ($100 cap). New GET /api/v1/guide/vods/<id>/download?grant= checks the nixamp.com store grant (kind vod, this id, this guide) and 302s to the file's play address with download=1.
  • File server: /api/v1/library/items/<id>/play?download=1 sends it as an attachment named for the item (.ext / .mp4 / .mp3 by what is actually sent).
  • Store (music-store.ts, store-routes.ts): kind vod on /buy?server=<guide>&kind=vod&vod=<id>, priced from the guide, allowed for known servers, *.nixamp.com and live.streaming.pit.world (+ NIXAMP_VOD_GUIDES). Receipt: Download the video. Grants of kind vod never open label zips.
  • Pages: /vod/ shows Download · $price when priced; My music on /radio shows Watch + Download for videos.
  • CLI: nixamp library publish ... --price USD (0 stops selling). Publishing again keeps the old title/note.

Tests: guide-vods + music-store cases added; bun test 1100 pass, tsc clean.

🤖 Generated with Claude Code

…he label's music (0.72.0)

The guide's owner puts a price on one of its own on-demand files (owned or
public-domain only, `nixamp library publish ... --price 1`). /vod/<id> then
shows Download · $1, which opens nixamp.com/buy (kind vod) and pays through
CoinPay like a song or an album. The receipt and My music link to the guide's
/api/v1/guide/vods/<id>/download, which checks the store grant and sends the
buyer on to the file's server with download=1 (an attachment, named for what
is sent). Watching stays free. Re-publishing keeps an old title and note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit b211a95 into main Oct 22, 2026
4 of 5 checks passed
@ralyodio
ralyodio deleted the feat/vod-buy-download branch October 22, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant