feat(media): albums — one link for a season or a photo album; fix path traversal in media get
An album is a sealed file (shade.album/v1) listing grants, so the relay cannot tell it from a film. `shade media put dir/` uploads every file and the album (subdirectories nest, natural order); `media get` brings an album back as a directory; /watch/ shows a grid with decrypted previews and Back returns to the album without putting grants in history. Kotlin reads albums (Albums.read) against a new shared vector. Fixed: `media get` used the sealer-chosen meta.name as the output path. Fixed a relay test race (flush() is sent, not received); the relay now reports framesIn. Verified: 64 TS tests x3, Kotlin 81/0, a 6-file album with a nested album uploaded, browsed, played and downloaded back bit-identical. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -191,7 +191,9 @@ describe('live relay over real WebSockets', () => {
|
||||
for (let i = 0; i < 30; i++) {
|
||||
await client.send({ type: 'chunk', bytes: new Uint8Array([i]) }, { keyframe: i % 10 === 0 });
|
||||
}
|
||||
await client.flush();
|
||||
// flush() means sent, not received: wait until the relay holds all 31,
|
||||
// or a fast viewer joins mid-burst and (correctly) gets an older backlog.
|
||||
await until(() => relay.stats().framesIn === 31);
|
||||
|
||||
const early: ReceivedFrame[] = [];
|
||||
const grant = parseGrant(encodeGrant(client.grant('oldest'))) as LiveGrant;
|
||||
|
||||
Reference in New Issue
Block a user