fix(subsonic): always include mandatory title field in Child responses

Removed `omitempty` from the `Title` struct tag in the `Child` response
type. The Subsonic/OpenSubsonic API spec requires `title` to be a
mandatory field, but songs with empty titles caused the field to be
omitted entirely, crashing clients like Symfonium during sync.

Ref: https://support.symfonium.app/t/app-gets-stuck-on-syncing-large-database/13004/8
This commit is contained in:
Deluan
2026-03-15 13:36:26 -04:00
parent 69e7d163fc
commit a887521d7a
10 changed files with 18 additions and 6 deletions
+8
View File
@@ -309,6 +309,14 @@ var _ = Describe("helpers", func() {
Expect(child.Artist).To(Equal("Test Artist"))
})
})
Context("when MediaFile has an empty title", func() {
It("still includes the title field in the response", func() {
mf.Title = ""
child := childFromMediaFile(ctx, mf)
Expect(child.Title).To(Equal(""))
})
})
})
Describe("osChildFromMediaFile", func() {