From c08fccf9f2d5215bddd35cf7e944597dcd97fc27 Mon Sep 17 00:00:00 2001 From: cld9x <> Date: Mon, 13 Jul 2020 19:32:52 +0200 Subject: [PATCH] Avoid nulls in DeoVR responses --- pkg/api/deovr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/deovr.go b/pkg/api/deovr.go index 2ec7bb51f..f2a00b30b 100644 --- a/pkg/api/deovr.go +++ b/pkg/api/deovr.go @@ -388,7 +388,7 @@ func getBaseURL() string { func scenesToDeoList(req *restful.Request, scenes []models.Scene) []DeoListItem { baseURL := "http://" + req.Request.Host - var list []DeoListItem + list := make([]DeoListItem, 0) for i := range scenes { item := DeoListItem{ Title: scenes[i].Title, @@ -404,7 +404,7 @@ func scenesToDeoList(req *restful.Request, scenes []models.Scene) []DeoListItem func filesToDeoList(req *restful.Request, files []models.File) []DeoListItem { baseURL := "http://" + req.Request.Host - var list []DeoListItem + list := make([]DeoListItem, 0) for i := range files { if files[i].Volume.Type == "local" { if !files[i].Volume.IsAvailable {