fix(202): make RemoteLibrariesEditScreen reviewable (NUL delimiter -> \u0000 escape) + Plex library-prefs missing-id 422 guard (review)
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 7s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 5m28s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m26s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped

This commit is contained in:
2026-07-11 16:52:05 +02:00
parent b9a2fdec50
commit 9a1ddec71a
3 changed files with 33 additions and 0 deletions
@@ -164,6 +164,18 @@ public class PlexMediaSourcesController(
.ToErrorResult();
}
// Require the complete set of this source's libraries (§C4a; matches Jellyfin/Emby): the PUT is a
// full flag document, so an omitted owned id would silently keep its old sync state.
var incomingIds = libraries.Map(l => l.Id).ToList();
var missingIds = ownedIds.Where(ownedId => !incomingIds.Contains(ownedId)).ToList();
if (missingIds.Count > 0)
{
return BaseError.New(
$"The request must include every library for Plex media source {id} " +
$"(missing id(s) {string.Join(", ", missingIds)})")
.ToErrorResult();
}
Either<BaseError, Unit> result =
await mediator.Send(request.ToPlexCommand(), cancellationToken);
if (result.IsLeft)