From fbd6c965b0379371e23fd1c740bab5363e5fd778 Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 25 May 2020 21:00:05 -0400 Subject: [PATCH] Always return `public` attribute in playlist response --- ...tcher-Match-Responses Playlists with data should match .JSON | 2 +- ...atcher-Match-Responses Playlists with data should match .XML | 2 +- server/subsonic/responses/responses.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON index f20c45ae..ae5756c4 100644 --- a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON +++ b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","playlists":{"playlist":[{"id":"111","name":"aaa","comment":"comment","songCount":2,"duration":120,"public":true,"owner":"admin","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"},{"id":"222","name":"bbb","songCount":0,"duration":0,"created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","playlists":{"playlist":[{"id":"111","name":"aaa","comment":"comment","songCount":2,"duration":120,"public":true,"owner":"admin","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"},{"id":"222","name":"bbb","songCount":0,"duration":0,"public":false,"created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}} diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML index 7c3f4118..9e9454a7 100644 --- a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML +++ b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.go index be1cc411..a44ea61e 100644 --- a/server/subsonic/responses/responses.go +++ b/server/subsonic/responses/responses.go @@ -194,7 +194,7 @@ type Playlist struct { Comment string `xml:"comment,attr,omitempty" json:"comment,omitempty"` SongCount int `xml:"songCount,attr" json:"songCount"` Duration int `xml:"duration,attr" json:"duration"` - Public bool `xml:"public,attr,omitempty" json:"public,omitempty"` + Public bool `xml:"public,attr" json:"public"` Owner string `xml:"owner,attr,omitempty" json:"owner,omitempty"` Created time.Time `xml:"created,attr" json:"created"` Changed time.Time `xml:"changed,attr" json:"changed"`