feat(sync): accept encrypted external media positions
OpenTubeX saves the playback position of media opened by URL, such as videos from other websites, only on the device that played it. To sync these positions, clients need a place to store them on the server.
The server now accepts an encrypted externalMediaPositions collection with a 16 MiB limit, the same as seen-video marks, and advertises external_media_positions: 1 in /health. Like other collections, it is opaque ciphertext and counts toward the account's 128 MiB total. Clients only sync the collection when the capability is present, so they keep working against older servers.
Older clients are unaffected. They ignore the new capability and only download the collections they know, so a new collection in the manifest or a live event for it doesn't change what they sync.
Proof: the collection limit test now covers the new collection and capability. All 97 tests pass with the environment CI uses, and cargo fmt --check and cargo clippy --all-targets are clean. A local build of this server passed e2e/tests/network/sync-server.spec.mjs with both the client from the companion OpenTubeX pull request (11 passed, 1 skipped) and the current OpenTubeX development client, which doesn't know the collection (11 passed, 1 skipped).
Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol on xhigh.
Sol verdict: approved
Made by Claude Opus 5.5 in Claude Code (T3 Code).