mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-08 14:21:09 +03:00
Merge branch 'master' into dlna-spike
This commit is contained in:
commit
fbb1d1493d
@ -45,7 +45,7 @@ func createAgents(ds model.DataStore) *Agents {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
enabled = append(enabled, name)
|
enabled = append(enabled, name)
|
||||||
res = append(res, init(ds))
|
res = append(res, agent)
|
||||||
}
|
}
|
||||||
log.Debug("List of agents enabled", "names", enabled)
|
log.Debug("List of agents enabled", "names", enabled)
|
||||||
|
|
||||||
|
@ -344,18 +344,10 @@ func (l *lastfmAgent) IsAuthorized(ctx context.Context, userId string) bool {
|
|||||||
func init() {
|
func init() {
|
||||||
conf.AddHook(func() {
|
conf.AddHook(func() {
|
||||||
agents.Register(lastFMAgentName, func(ds model.DataStore) agents.Interface {
|
agents.Register(lastFMAgentName, func(ds model.DataStore) agents.Interface {
|
||||||
a := lastFMConstructor(ds)
|
return lastFMConstructor(ds)
|
||||||
if a != nil {
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
})
|
||||||
scrobbler.Register(lastFMAgentName, func(ds model.DataStore) scrobbler.Scrobbler {
|
scrobbler.Register(lastFMAgentName, func(ds model.DataStore) scrobbler.Scrobbler {
|
||||||
a := lastFMConstructor(ds)
|
return lastFMConstructor(ds)
|
||||||
if a != nil {
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user