mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Disable Last.FM features based on LastFM.Enabled
config option
This commit is contained in:
parent
289da56f64
commit
cfb113bd33
9 changed files with 9 additions and 20 deletions
|
@ -5,15 +5,11 @@ import (
|
|||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/navidrome/navidrome/conf"
|
||||
|
||||
"github.com/navidrome/navidrome/server/events"
|
||||
|
||||
"github.com/navidrome/navidrome/log"
|
||||
|
||||
"github.com/ReneKroon/ttlcache/v2"
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/model/request"
|
||||
"github.com/navidrome/navidrome/server/events"
|
||||
"github.com/navidrome/navidrome/utils/singleton"
|
||||
)
|
||||
|
||||
|
@ -184,9 +180,6 @@ func (p *playTracker) dispatchScrobble(ctx context.Context, t *model.MediaFile,
|
|||
var constructors map[string]Constructor
|
||||
|
||||
func Register(name string, init Constructor) {
|
||||
if !conf.Server.DevEnableScrobble {
|
||||
return
|
||||
}
|
||||
if constructors == nil {
|
||||
constructors = make(map[string]Constructor)
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/navidrome/navidrome/conf"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/model/request"
|
||||
"github.com/navidrome/navidrome/server/events"
|
||||
|
@ -24,7 +23,6 @@ var _ = Describe("PlayTracker", func() {
|
|||
var fake fakeScrobbler
|
||||
|
||||
BeforeEach(func() {
|
||||
conf.Server.DevEnableScrobble = true
|
||||
ctx = context.Background()
|
||||
ctx = request.WithUser(ctx, model.User{ID: "u-1"})
|
||||
ctx = request.WithPlayer(ctx, model.Player{ScrobbleEnabled: true})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue