Commit Graph
8 Commits
Author SHA1 Message Date
thePR0M3TH3ANandClaude Opus 4.8 c62114557c feat(webseed): manage multiple web seeds in the edit modal (slice 3/3)
Completes end-to-end multi-webseed support: the editor can now see, add, and
remove every web seed a video carries.

- magnetShared: promote normalizeWebSeedList to a shared export (videoNotePayload
  now imports it) and add setMagnetWebSeeds(), which replaces a magnet's COMPLETE
  ws= set with exactly the requested list. ensureWebSeeds is append-only, so
  without set-semantics a webseed a user deleted would linger in the magnet;
  setMagnetWebSeeds strips the existing ws= params first, making removal stick.
- edit-video-modal.html: the single "Web seed (ws=)" input becomes a "Web seeds
  (one per line)" textarea with backup-origin help text.
- EditModal: open() populates the field from extractAllWebSeeds() (every seed,
  not just the first). On save, when the field was manually edited the magnet's
  ws set is rebuilt from the field via setMagnetWebSeeds (true add/remove);
  otherwise existing seeds are preserved untouched. The content `ws` field still
  stores the primary (first) seed while the magnet carries the full set.

Mutation-verified (no-strip and no-add both fail the removal/add tests); build,
relevant lints (inline-styles, tokens, innerHTML), and full unit suite green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-19 08:52:11 -04:00
thePR0M3TH3ANandClaude Opus 4.8 cf98d06cca feat(webseed): carry multiple web seeds through publish (slice 1/3)
Foundation for declaring more than one web seed per video so the WebTorrent
swarm can pull pieces from an independent backup origin when the primary CDN
is overloaded — multiple `ws=` params are the standard BEP19 carrier and the
playback path already attaches every webseed it finds in the magnet.

- magnetShared: add extractAllWebSeeds(), which returns every `ws=` URL
  (deduped, in order) instead of only the first like extractMagnetHints —
  so a magnet with several webseeds can be round-tripped without dropping the
  extras.
- videoNotePayload: normalizeWebSeedList() accepts the ws field as an array OR
  a newline/comma-delimited string and feeds the full, deduped set into the
  magnet (plus the hosted CDN url, as before). A single ws string still works
  unchanged; the content `ws` field still reflects the primary seed.

Upload/Edit UI to author and manage the list lands in slices 2 and 3.

Mutation-verified (array-drop, split-drop, first-only, dedupe-loss all fail
the new tests); build + full unit suite green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-19 08:21:18 -04:00
thePR0M3TH3AN d10d65634d Fix magnet query parsing for values containing '=' 2026-02-09 23:22:49 -05:00
thePR0M3TH3AN a59b7a7a8e Fix magnet param parsing regression coverage 2026-02-09 23:16:13 -05:00
google-labs-jules[bot]andPR0M3TH3AN f80bbc7dae chore(ai): remove dead code (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 20:33:25 +00:00
thePR0M3TH3AN 50793430a8 Add btih extraction helper 2026-01-26 21:49:18 -05:00
thePR0M3TH3AN c2c7f6445d refactor: centralize safe decode helpers 2025-10-02 12:48:24 -04:00
thePR0M3TH3AN 7f586a38c4 Refactor magnet helpers into shared module 2025-10-02 12:30:12 -04:00