From 439cff47ac3d5d32487a9f81b82a3f4a78756a76 Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 5 Mar 2026 21:00:31 -0500 Subject: [PATCH] feat: add server-managed fields for plugin playlists in rest adapter Signed-off-by: Deluan --- core/playlists/rest_adapter.go | 3 +++ core/playlists/rest_adapter_test.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/core/playlists/rest_adapter.go b/core/playlists/rest_adapter.go index 818d8a5cb..5e0042d04 100644 --- a/core/playlists/rest_adapter.go +++ b/core/playlists/rest_adapter.go @@ -69,6 +69,9 @@ func (s *playlists) savePlaylist(ctx context.Context, pls *model.Playlist) (stri pls.UploadedImage = "" // Managed by image upload endpoint pls.ExternalImageURL = "" // Managed by M3U import / plugins only pls.EvaluatedAt = nil // Server-managed + pls.PluginID = "" // Server-managed (plugin system) + pls.PluginPlaylistID = "" // Server-managed (plugin system) + pls.ValidUntil = nil // Server-managed (plugin system) err := s.ds.Playlist(ctx).Put(pls) if err != nil { return "", err diff --git a/core/playlists/rest_adapter_test.go b/core/playlists/rest_adapter_test.go index 825c53656..832cdbda7 100644 --- a/core/playlists/rest_adapter_test.go +++ b/core/playlists/rest_adapter_test.go @@ -74,6 +74,9 @@ var _ = Describe("REST Adapter", func() { UploadedImage: "injected-image-path", ExternalImageURL: "http://evil.example.com/ssrf", EvaluatedAt: &now, + PluginID: "fake-plugin", + PluginPlaylistID: "fake-playlist-id", + ValidUntil: &now, } _, err := repo.Save(pls) Expect(err).ToNot(HaveOccurred()) @@ -90,6 +93,9 @@ var _ = Describe("REST Adapter", func() { Expect(saved.UploadedImage).To(BeEmpty()) Expect(saved.ExternalImageURL).To(BeEmpty()) Expect(saved.EvaluatedAt).To(BeNil()) + Expect(saved.PluginID).To(BeEmpty()) + Expect(saved.PluginPlaylistID).To(BeEmpty()) + Expect(saved.ValidUntil).To(BeNil()) }) })