Moved logic of collapsing songs into albums to model package
(it should really be called domain.... maybe will rename it later)
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
"github.com/navidrome/navidrome/server/events"
|
||||
"github.com/navidrome/navidrome/server/subsonic/responses"
|
||||
"github.com/navidrome/navidrome/utils"
|
||||
"github.com/navidrome/navidrome/utils/math2"
|
||||
"github.com/navidrome/navidrome/utils/number"
|
||||
)
|
||||
|
||||
const Version = "1.16.1"
|
||||
@@ -138,7 +138,7 @@ func (api *Router) routes() http.Handler {
|
||||
})
|
||||
r.Group(func(r chi.Router) {
|
||||
// configure request throttling
|
||||
maxRequests := math2.Max(2, runtime.NumCPU())
|
||||
maxRequests := number.Max(2, runtime.NumCPU())
|
||||
r.Use(middleware.ThrottleBacklog(maxRequests, consts.RequestThrottleBacklogLimit, consts.RequestThrottleBacklogTimeout))
|
||||
hr(r, "getAvatar", api.GetAvatar)
|
||||
hr(r, "getCoverArt", api.GetCoverArt)
|
||||
|
||||
Reference in New Issue
Block a user