fix playlist playback nicely
This commit is contained in:
parent
bc7e493e71
commit
3fd19eb149
TomatenMusic/Services
TomatenMusicCore
@ -46,9 +46,9 @@ namespace TomatenMusic_Api
|
|||||||
if (e.Response.IsPlaylist)
|
if (e.Response.IsPlaylist)
|
||||||
{
|
{
|
||||||
if (e.Now)
|
if (e.Now)
|
||||||
await player.PlayPlaylistNowAsync(e.Response.Playlist);
|
await player.PlayNowAsync(e.Response.Playlist);
|
||||||
else
|
else
|
||||||
await player.PlayPlaylistAsync(e.Response.Playlist);
|
await player.PlayItemAsync(e.Response.Playlist);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
if (e.Now)
|
if (e.Now)
|
||||||
|
@ -84,7 +84,7 @@ namespace TomatenMusic.Commands
|
|||||||
if (response.IsPlaylist)
|
if (response.IsPlaylist)
|
||||||
{
|
{
|
||||||
ILavalinkPlaylist playlist = response.Playlist;
|
ILavalinkPlaylist playlist = response.Playlist;
|
||||||
await player.PlayPlaylistNowAsync(playlist);
|
await player.PlayNowAsync(playlist);
|
||||||
|
|
||||||
_ = ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
_ = ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
||||||
Common.AsEmbed(playlist)
|
Common.AsEmbed(playlist)
|
||||||
@ -237,7 +237,7 @@ namespace TomatenMusic.Commands
|
|||||||
if (response.IsPlaylist)
|
if (response.IsPlaylist)
|
||||||
{
|
{
|
||||||
ILavalinkPlaylist playlist = response.Playlist;
|
ILavalinkPlaylist playlist = response.Playlist;
|
||||||
await player.PlayPlaylistAsync(playlist);
|
await player.PlayItemAsync(playlist);
|
||||||
|
|
||||||
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
|
||||||
Common.AsEmbed(playlist)
|
Common.AsEmbed(playlist)
|
||||||
|
@ -64,27 +64,6 @@ namespace TomatenMusic.Music
|
|||||||
QueuePrompt.UpdateFor(GuildId);
|
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()
|
public async Task RewindAsync()
|
||||||
{
|
{
|
||||||
EnsureNotDestroyed();
|
EnsureNotDestroyed();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user