Disable Last.FM features based on LastFM.Enabled config option

This commit is contained in:
Deluan 2021-07-02 09:50:07 -04:00
commit cfb113bd33
9 changed files with 9 additions and 20 deletions

View file

@ -76,7 +76,7 @@ func startServer() (func() error, func(err error)) {
a := CreateServer(conf.Server.MusicFolder)
a.MountRouter("Native API", consts.URLPathNativeAPI, CreateNativeAPIRouter())
a.MountRouter("Subsonic API", consts.URLPathSubsonicAPI, CreateSubsonicAPIRouter())
if conf.Server.DevEnableScrobble {
if conf.Server.LastFM.Enabled {
a.MountRouter("LastFM Auth", consts.URLPathNativeAPI+"/lastfm", CreateLastFMRouter())
}
return a.Run(fmt.Sprintf("%s:%d", conf.Server.Address, conf.Server.Port))