[PR #16189] SyncPlay: add authoritative V2 group-state/snapshot API while preserving legacy route compatibility #14553

Open
opened 2026-02-07 07:31:37 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/16189
Author: @Al-Battashi
Created: 2/6/2026
Status: 🔄 Open

Base: masterHead: codex/syncplay-v2-server


📝 Commits (1)

  • 2b7d50a syncplay: add v2 authoritative group state and reconciliation

📊 Changes

13 files changed (+1324 additions, -31 deletions)

View changed files

📝 Emby.Server.Implementations/SyncPlay/Group.cs (+153 -14)
📝 Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs (+73 -5)
📝 Jellyfin.Api/Controllers/SyncPlayController.cs (+62 -1)
📝 Jellyfin.Server.Implementations/Security/AuthorizationContext.cs (+3 -1)
📝 MediaBrowser.Controller/SyncPlay/ISyncPlayManager.cs (+15 -0)
📝 MediaBrowser.Model/SyncPlay/GroupUpdateType.cs (+30 -10)
MediaBrowser.Model/SyncPlay/SyncPlayGroupSnapshotDto.cs (+56 -0)
MediaBrowser.Model/SyncPlay/SyncPlayGroupSnapshotUpdate.cs (+24 -0)
MediaBrowser.Model/SyncPlay/SyncPlayGroupStateV2Dto.cs (+44 -0)
docs/syncplay/FILE_INDEX.md (+135 -0)
docs/syncplay/README.md (+245 -0)
tests/Jellyfin.Api.Tests/Controllers/SyncPlayControllerTests.cs (+200 -0)
tests/Jellyfin.Server.Implementations.Tests/SyncPlay/GroupV2StateTests.cs (+284 -0)

📄 Description

Summary

This PR introduces the SyncPlay V2 server protocol surface and state model used by the new web client, while keeping existing SyncPlay routes available for backward compatibility.

What Changed

  • Added authoritative V2 state contracts:
    • SyncPlayGroupSnapshotDto
    • SyncPlayGroupSnapshotUpdate
    • SyncPlayGroupStateV2Dto
  • Added V2 read endpoints:
    • GET /SyncPlay/V2/Joined
    • GET /SyncPlay/V2/{id}
  • Added V2 aliases for existing SyncPlay operations:
    • New, Join, Leave, List, SetNewQueue, SetPlaylistItem, RemoveFromPlaylist, MovePlaylistItem, Queue, Pause, Unpause, Stop, Seek, Ready, Buffering, SetIgnoreWait, NextItem, PreviousItem, SetRepeatMode, SetShuffleMode, Ping
  • Updated group/server flow to emit snapshot-based updates and revisioned state for deterministic client recovery.
  • Updated authorization routing to include new V2 paths.
  • Added/updated tests for V2 endpoints and V2 snapshot/group-state behavior.
  • Added SyncPlay docs and file index for maintainability.

Compatibility

  • No breaking API removal in this PR.
  • Legacy /SyncPlay/* routes remain exposed.
  • /SyncPlay/V2/* is the authoritative protocol for modern clients.

Validation

  • Built solution in Debug.
  • Ran SyncPlay-focused API tests.
  • Ran SyncPlay-focused server implementation tests.

Client Side : https://github.com/jellyfin/jellyfin-web/pull/7566


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/16189 **Author:** [@Al-Battashi](https://github.com/Al-Battashi) **Created:** 2/6/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `codex/syncplay-v2-server` --- ### 📝 Commits (1) - [`2b7d50a`](https://github.com/jellyfin/jellyfin/commit/2b7d50a60a196a54064f7b4740b5378e7eecf12c) syncplay: add v2 authoritative group state and reconciliation ### 📊 Changes **13 files changed** (+1324 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/SyncPlay/Group.cs` (+153 -14) 📝 `Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs` (+73 -5) 📝 `Jellyfin.Api/Controllers/SyncPlayController.cs` (+62 -1) 📝 `Jellyfin.Server.Implementations/Security/AuthorizationContext.cs` (+3 -1) 📝 `MediaBrowser.Controller/SyncPlay/ISyncPlayManager.cs` (+15 -0) 📝 `MediaBrowser.Model/SyncPlay/GroupUpdateType.cs` (+30 -10) ➕ `MediaBrowser.Model/SyncPlay/SyncPlayGroupSnapshotDto.cs` (+56 -0) ➕ `MediaBrowser.Model/SyncPlay/SyncPlayGroupSnapshotUpdate.cs` (+24 -0) ➕ `MediaBrowser.Model/SyncPlay/SyncPlayGroupStateV2Dto.cs` (+44 -0) ➕ `docs/syncplay/FILE_INDEX.md` (+135 -0) ➕ `docs/syncplay/README.md` (+245 -0) ➕ `tests/Jellyfin.Api.Tests/Controllers/SyncPlayControllerTests.cs` (+200 -0) ➕ `tests/Jellyfin.Server.Implementations.Tests/SyncPlay/GroupV2StateTests.cs` (+284 -0) </details> ### 📄 Description ## Summary This PR introduces the SyncPlay V2 server protocol surface and state model used by the new web client, while keeping existing SyncPlay routes available for backward compatibility. ## What Changed - Added authoritative V2 state contracts: - `SyncPlayGroupSnapshotDto` - `SyncPlayGroupSnapshotUpdate` - `SyncPlayGroupStateV2Dto` - Added V2 read endpoints: - `GET /SyncPlay/V2/Joined` - `GET /SyncPlay/V2/{id}` - Added V2 aliases for existing SyncPlay operations: - `New`, `Join`, `Leave`, `List`, `SetNewQueue`, `SetPlaylistItem`, `RemoveFromPlaylist`, `MovePlaylistItem`, `Queue`, `Pause`, `Unpause`, `Stop`, `Seek`, `Ready`, `Buffering`, `SetIgnoreWait`, `NextItem`, `PreviousItem`, `SetRepeatMode`, `SetShuffleMode`, `Ping` - Updated group/server flow to emit snapshot-based updates and revisioned state for deterministic client recovery. - Updated authorization routing to include new V2 paths. - Added/updated tests for V2 endpoints and V2 snapshot/group-state behavior. - Added SyncPlay docs and file index for maintainability. ## Compatibility - No breaking API removal in this PR. - Legacy `/SyncPlay/*` routes remain exposed. - `/SyncPlay/V2/*` is the authoritative protocol for modern clients. ## Validation - Built solution in Debug. - Ran SyncPlay-focused API tests. - Ran SyncPlay-focused server implementation tests. Client Side : https://github.com/jellyfin/jellyfin-web/pull/7566 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:31:37 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14553