fix playlist playback nicely
This commit is contained in:
parent
bc7e493e71
commit
3fd19eb149
@ -46,9 +46,9 @@ namespace TomatenMusic_Api
|
||||
if (e.Response.IsPlaylist)
|
||||
{
|
||||
if (e.Now)
|
||||
await player.PlayPlaylistNowAsync(e.Response.Playlist);
|
||||
await player.PlayNowAsync(e.Response.Playlist);
|
||||
else
|
||||
await player.PlayPlaylistAsync(e.Response.Playlist);
|
||||
await player.PlayItemAsync(e.Response.Playlist);
|
||||
}else
|
||||
{
|
||||
if (e.Now)
|
||||
|
@ -84,7 +84,7 @@ namespace TomatenMusic.Commands
|
||||
if (response.IsPlaylist)
|
||||
{
|
||||
ILavalinkPlaylist playlist = response.Playlist;
|
||||
await player.PlayPlaylistNowAsync(playlist);
|
||||
await player.PlayNowAsync(playlist);
|
||||
|
||||
_ = ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
||||
Common.AsEmbed(playlist)
|
||||
@ -237,7 +237,7 @@ namespace TomatenMusic.Commands
|
||||
if (response.IsPlaylist)
|
||||
{
|
||||
ILavalinkPlaylist playlist = response.Playlist;
|
||||
await player.PlayPlaylistAsync(playlist);
|
||||
await player.PlayItemAsync(playlist);
|
||||
|
||||
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
||||
Common.AsEmbed(playlist)
|
||||
|
@ -64,27 +64,6 @@ namespace TomatenMusic.Music
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
public async Task PlayPlaylistAsync(ILavalinkPlaylist playlist)
|
||||
{
|
||||
EnsureNotDestroyed();
|
||||
EnsureConnected();
|
||||
|
||||
_ = playlist.Play(this);
|
||||
_logger.LogInformation("Started playing Playlist {0} on Guild {1}", playlist.Title, (await GetGuildAsync()).Name);
|
||||
|
||||
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
public async Task PlayPlaylistNowAsync(ILavalinkPlaylist playlist)
|
||||
{
|
||||
EnsureConnected();
|
||||
EnsureNotDestroyed();
|
||||
|
||||
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
public async Task RewindAsync()
|
||||
{
|
||||
EnsureNotDestroyed();
|
||||
|
Loading…
x
Reference in New Issue
Block a user