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