mirror of
https://github.com/Superredstone/spotiflac-cli.git
synced 2026-03-07 20:18:07 +01:00
33 lines
577 B
Go
33 lines
577 B
Go
package lib
|
|
|
|
type App struct {
|
|
SelectedTidalApiUrl string
|
|
Verbose bool
|
|
SpotifyClient *SpotifyClient
|
|
ApiInterval int // How many ms to wait between one call to apis and the other
|
|
NoFallback bool
|
|
}
|
|
|
|
func NewApp() App {
|
|
return App{
|
|
Verbose: false,
|
|
ApiInterval: 800,
|
|
NoFallback: false,
|
|
}
|
|
}
|
|
|
|
func (app *App) Init() error {
|
|
app.log("Initializing Tidal")
|
|
err := app.LoadTidalApis()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
app.log("Initializing Spotify")
|
|
if err := app.InitSpotifyClient(); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|