mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 23:45:07 +00:00
feat(remote)!: make remote serve WebSocket-only and refuse older clients with CLIENT_OUTDATED
This commit is contained in:
@@ -6,6 +6,7 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
from typing import Any
|
||||
@@ -149,6 +150,7 @@ def tracks_reply(client_plugins: Any) -> tuple[Any, Any]:
|
||||
session_id="plugins",
|
||||
client_plugins=client_plugins,
|
||||
)
|
||||
entry.presence.attached()
|
||||
entry.title_map = {"t1": "EXAMPLE title"}
|
||||
try:
|
||||
resp = await handlers.session_tracks_handler({"title_id": "t1"}, "plugins")
|
||||
@@ -204,7 +206,8 @@ def test_the_create_route_keeps_the_client_plugin_list(monkeypatch: pytest.Monke
|
||||
listed = {"example": {"version": "1.0", "device": DEVICE_FACTS}}
|
||||
|
||||
async def run() -> Any:
|
||||
resp = await handlers.session_create_handler({"service": "EXAMPLE", "title_id": "t", "plugins": listed})
|
||||
body = {"service": "EXAMPLE", "title_id": "t", "session_id": str(uuid.uuid4()), "plugins": listed}
|
||||
resp = await handlers.session_create_handler(body)
|
||||
session_id = json.loads(resp.body)["session_id"]
|
||||
entry = store_mod.get_session_store().peek(session_id)
|
||||
await store_mod.get_session_store().delete(session_id)
|
||||
|
||||
Reference in New Issue
Block a user