3 Commits

Author SHA1 Message Date
Tim Müller
a71f65de55 update package sources 2022-04-06 21:32:43 +02:00
Tim Müller
3fd19eb149 fix playlist playback nicely 2022-04-01 18:53:07 +02:00
Tim Müller
bc7e493e71 fix playlist playback not working 2022-04-01 18:46:03 +02:00
5 changed files with 8 additions and 36 deletions

View File

@@ -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)

View File

@@ -5,10 +5,6 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>TomatenMusic_Api</RootNamespace>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.emzi0767.com/api/v3/index.json
</RestoreAdditionalProjectSources>
</PropertyGroup>
<ItemGroup>

View File

@@ -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)

View File

@@ -64,26 +64,6 @@ namespace TomatenMusic.Music
QueuePrompt.UpdateFor(GuildId);
}
public async Task PlayPlaylistAsync(ILavalinkPlaylist playlist)
{
EnsureNotDestroyed();
EnsureConnected();
_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();

View File

@@ -4,17 +4,13 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.emzi0767.com/api/v3/index.json
</RestoreAdditionalProjectSources>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DSharpPlus" Version="4.2.0-nightly-01101" />
<PackageReference Include="DSharpPlus.Interactivity" Version="4.2.0-nightly-01101" />
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.2.0-nightly-01101" />
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.56.0.2630" />
<PackageReference Include="DSharpPlus" Version="4.2.0-nightly-01107" />
<PackageReference Include="DSharpPlus.Interactivity" Version="4.2.0-nightly-01107" />
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.2.0-nightly-01107" />
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.57.0.2637" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.42" />
<PackageReference Include="Lavalink4NET" Version="2.1.1" />
<PackageReference Include="Lavalink4NET.DSharpPlus" Version="2.1.1" />