Clean up, comments and logs
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user