return no entries when out of bounds musicFolderId is requested

This commit is contained in:
sentriz
2023-11-08 23:17:19 +00:00
parent a472421106
commit c55339e19a

View File

@@ -6,6 +6,7 @@ import (
"log" "log"
"math" "math"
"net/http" "net/http"
"os"
"path/filepath" "path/filepath"
"sync" "sync"
"time" "time"
@@ -503,7 +504,7 @@ func getMusicFolder(musicPaths []MusicPath, p params.Params) string {
return "" return ""
} }
if idx < 0 || idx >= len(musicPaths) { if idx < 0 || idx >= len(musicPaths) {
return "" return os.DevNull
} }
return musicPaths[idx].Path return musicPaths[idx].Path
} }