Clean up, comments and logs

This commit is contained in:
Deluan
2021-02-08 11:21:23 -05:00
committed by Deluan Quintão
parent 365dff6435
commit 52a407b84b
3 changed files with 23 additions and 38 deletions
-23
View File
@@ -1,12 +1,7 @@
package core
import (
"net/http"
"github.com/google/wire"
"github.com/navidrome/navidrome/conf"
"github.com/navidrome/navidrome/core/lastfm"
"github.com/navidrome/navidrome/core/spotify"
"github.com/navidrome/navidrome/core/transcoder"
)
@@ -20,23 +15,5 @@ var Set = wire.NewSet(
NewExternalInfo2,
NewCacheWarmer,
NewPlayers,
LastFMNewClient,
SpotifyNewClient,
transcoder.New,
)
func LastFMNewClient() *lastfm.Client {
if conf.Server.LastFM.ApiKey == "" {
return nil
}
return lastfm.NewClient(conf.Server.LastFM.ApiKey, conf.Server.LastFM.Language, http.DefaultClient)
}
func SpotifyNewClient() *spotify.Client {
if conf.Server.Spotify.ID == "" || conf.Server.Spotify.Secret == "" {
return nil
}
return spotify.NewClient(conf.Server.Spotify.ID, conf.Server.Spotify.Secret, http.DefaultClient)
}