add /api/player/disconnect endpoint

This commit is contained in:
Tim Müller
2022-03-22 20:00:33 +01:00
parent 64bbf0598e
commit 482a64ac54
9 changed files with 88 additions and 26 deletions

View File

@@ -39,9 +39,6 @@ namespace TomatenMusic.Music
_spotify = serviceProvider.GetRequiredService<ISpotifyService>();
_audioService = serviceProvider.GetRequiredService<IAudioService>();
}
public async override Task PlayAsync(LavalinkTrack track, TimeSpan? startTime = null, TimeSpan? endTime = null, bool noReplace = true)
{

View File

@@ -99,7 +99,8 @@ namespace TomatenMusic
.AddSingleton<YoutubeService>()
.AddSingleton<LyricsOptions>()
.AddSingleton<LyricsService>()
.AddSingleton(SpotifyClientConfig.CreateDefault().WithAuthenticator(new ClientCredentialsAuthenticator(config.SpotifyClientId, config.SpotifyClientSecret))))
.AddSingleton(
SpotifyClientConfig.CreateDefault().WithAuthenticator(new ClientCredentialsAuthenticator(config.SpotifyClientId, config.SpotifyClientSecret))))
.Build();
ServiceProvider = _host.Services;