dont ommit empty json lists

This commit is contained in:
sentriz
2020-02-21 03:28:56 +00:00
parent 526de91566
commit 9b8a35df00
3 changed files with 10 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package ctrlsubsonic
import (
"fmt"
"log"
"net/http"
"sort"
@@ -130,6 +131,7 @@ func (c *Controller) ServeGetPlaylists(r *http.Request) *spec.Response {
sub.Playlists = &spec.Playlists{
List: make([]*spec.Playlist, len(playlists)),
}
fmt.Println("aaaa")
for i, playlist := range playlists {
sub.Playlists.List[i] = spec.NewPlaylist(playlist)
sub.Playlists.List[i].Owner = user.Name