Merge branch 'master' into dlna-spike

This commit is contained in:
Rob Emery 2025-04-20 11:36:10 -01:00 committed by GitHub
commit fbb1d1493d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 11 deletions

View File

@ -45,7 +45,7 @@ func createAgents(ds model.DataStore) *Agents {
continue
}
enabled = append(enabled, name)
res = append(res, init(ds))
res = append(res, agent)
}
log.Debug("List of agents enabled", "names", enabled)

View File

@ -344,18 +344,10 @@ func (l *lastfmAgent) IsAuthorized(ctx context.Context, userId string) bool {
func init() {
conf.AddHook(func() {
agents.Register(lastFMAgentName, func(ds model.DataStore) agents.Interface {
a := lastFMConstructor(ds)
if a != nil {
return a
}
return nil
return lastFMConstructor(ds)
})
scrobbler.Register(lastFMAgentName, func(ds model.DataStore) scrobbler.Scrobbler {
a := lastFMConstructor(ds)
if a != nil {
return a
}
return nil
return lastFMConstructor(ds)
})
})
}