feat(plex): Collections Phase 2 — admin collection editing (write-back to Plex)

Admins can curate Plex collections from a movie's info page ("Collections"
button → PlexCollectionEditor dialog): create a collection (seeded with the
movie), add/remove the movie to/from editable collections, delete a collection,
and "take over" an existing plain Plex collection (mark it editable). All writes
go to Plex (POST/PUT/DELETE via new PlexClient methods) and are reflected on
every client; a targeted single-collection re-sync (sync.resync_collection /
delete_collection_local) updates the local mirror without the full ~4-min sync.

Gating (per the design decisions): editing is ADMIN-ONLY (collections are shared
library-wide); only plain manual collections are editable — smart + external
auto-lists (IMDb/TMDb/…) are always read-only (can_edit = editable && !smart &&
source=="collection"). New admin endpoints under /api/plex/collections
(create/items add+remove/rename/delete/editable). Verified end-to-end incl. the
live Plex write API (create/add/rename/remove/delete all 200, self-cleaned) and
the editor UI (create + delete with confirm) on localdev.
This commit is contained in:
npeter83 2026-07-06 17:33:16 +02:00
parent 4b053a55da
commit 8291f06525
12 changed files with 602 additions and 13 deletions

View file

@ -28,12 +28,28 @@
"genre": "Genre",
"year": "Jahr",
"duration": "Länge",
"durationOpt": { "short": "Unter 90 Min.", "mid": "90120 Min.", "long": "Über 2 Std." },
"durationOpt": {
"short": "Unter 90 Min.",
"mid": "90120 Min.",
"long": "Über 2 Std."
},
"added": "Zu Plex hinzugefügt",
"addedOpt": { "24h": "24 Std.", "1w": "1 Woche", "1m": "1 Monat", "6m": "6 Monate", "1y": "1 Jahr" },
"addedOpt": {
"24h": "24 Std.",
"1w": "1 Woche",
"1m": "1 Monat",
"6m": "6 Monate",
"1y": "1 Jahr"
},
"contentRating": "Altersfreigabe",
"match": { "any": "Beliebig", "all": "Alle" },
"dir": { "desc": "↓ Absteigend", "asc": "↑ Aufsteigend" },
"match": {
"any": "Beliebig",
"all": "Alle"
},
"dir": {
"desc": "↓ Absteigend",
"asc": "↑ Aufsteigend"
},
"collection": "Sammlung",
"collectionSearch": "Sammlungen suchen…",
"collectionEmpty": "Keine Sammlungen"
@ -59,6 +75,20 @@
"count": "{{count}} Titel",
"added": "hinzugefügt"
},
"collEditor": {
"manage": "Sammlungen",
"title": "Sammlungen — {{title}}",
"newPlaceholder": "Name der neuen Sammlung…",
"create": "Erstellen",
"search": "Sammlungen filtern…",
"none": "Noch keine bearbeitbaren Sammlungen. Erstelle oben eine.",
"count": "{{count}} Titel",
"delete": "Löschen",
"deleteConfirm": "Sammlung „{{title}}“ aus Plex löschen? Betrifft alle Benutzer.",
"note": "Änderungen werden in Plex geschrieben und für alle Clients/Benutzer sichtbar.",
"others": "{{count}} vorhandene Sammlungen verwalten…",
"makeEditable": "Verwalten"
},
"player": {
"loading": "Wird geladen…",
"back": "Zurück",