Compare commits
2 Commits
master
...
features/p
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f14eb8a263 | ||
![]() |
97b9514c42 |
@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TomatenMusic", "TomatenMusi
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TomatenMusicCore", "TomatenMusicCore\TomatenMusicCore.csproj", "{40B1E82B-656D-413B-B636-EB0AE84391E2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TomatenMusic.Panel", "TomatenMusic.Panel\TomatenMusic.Panel.csproj", "{D138639E-0D85-4D04-99A8-1C14A550C65B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -27,6 +29,10 @@ Global
|
||||
{40B1E82B-656D-413B-B636-EB0AE84391E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{40B1E82B-656D-413B-B636-EB0AE84391E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{40B1E82B-656D-413B-B636-EB0AE84391E2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D138639E-0D85-4D04-99A8-1C14A550C65B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D138639E-0D85-4D04-99A8-1C14A550C65B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D138639E-0D85-4D04-99A8-1C14A550C65B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D138639E-0D85-4D04-99A8-1C14A550C65B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
7
TomatenMusic.Panel/ServerPanel.cs
Normal file
7
TomatenMusic.Panel/ServerPanel.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace TomatenMusic.Panel
|
||||
{
|
||||
public class ServerPanel
|
||||
{
|
||||
|
||||
}
|
||||
}
|
13
TomatenMusic.Panel/TomatenMusic.Panel.csproj
Normal file
13
TomatenMusic.Panel/TomatenMusic.Panel.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TomatenMusicCore\TomatenMusicCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -44,9 +44,7 @@ namespace TomatenMusic.Music.Entitites
|
||||
if (!player.PlayerQueue.Queue.Any())
|
||||
player.PlayerQueue.CurrentPlaylist = this;
|
||||
|
||||
if (!withoutQueuePrepend && player.State == PlayerState.Playing)
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
|
||||
Queue<TomatenMusicTrack> reversedTracks = new Queue<TomatenMusicTrack>(Tracks);
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace TomatenMusicCore.Music.Entities
|
||||
|
||||
public async Task PlayNow(GuildPlayer player, TimeSpan? startTime = null, TimeSpan? endTime = null, bool withoutQueuePrepend = false)
|
||||
{
|
||||
if (!withoutQueuePrepend && player.State == PlayerState.Playing)
|
||||
if (!withoutQueuePrepend)
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
|
||||
|
||||
|
@ -57,9 +57,7 @@ namespace TomatenMusic.Music.Entitites
|
||||
if (!player.PlayerQueue.Queue.Any())
|
||||
player.PlayerQueue.CurrentPlaylist = this;
|
||||
|
||||
if (!withoutQueuePrepend && player.State == PlayerState.Playing)
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
|
||||
|
||||
Queue<TomatenMusicTrack> reversedTracks = new Queue<TomatenMusicTrack>(Tracks);
|
||||
|
@ -101,7 +101,7 @@ namespace TomatenMusic.Music
|
||||
}
|
||||
|
||||
_logger.LogInformation($"Skipped Track {CurrentTrack.Title} for Track {response.Track.Title}");
|
||||
await PlayNowAsync(response.Track, withoutQueuePrepend: true);
|
||||
await base.PlayAsync(response.Track);
|
||||
QueuePrompt.UpdateFor(GuildId);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace TomatenMusic.Music
|
||||
|
||||
public TomatenMusicTrack LastTrack { get; set; }
|
||||
|
||||
public List<TomatenMusicTrack> QueueLoopList { get; private set; } = new List<TomatenMusicTrack>();
|
||||
public List<TomatenMusicTrack> QueueLoopList { get; private set; }
|
||||
|
||||
public void QueueTrack(TomatenMusicTrack track)
|
||||
{
|
||||
@ -95,7 +95,7 @@ namespace TomatenMusic.Music
|
||||
public MusicActionResponse NextTrack(bool ignoreLoop = false, bool autoplay = false)
|
||||
{
|
||||
if (LastTrack != null)
|
||||
if (LoopType != LoopType.TRACK || (ignoreLoop && (Queue.Any() || autoplay)))
|
||||
if (LoopType != LoopType.NONE && Queue.Count == 0 || autoplay)
|
||||
PlayedTracks = new Queue<TomatenMusicTrack>(PlayedTracks.Prepend(new TomatenMusicTrack(LastTrack.WithPosition(TimeSpan.Zero))));
|
||||
|
||||
switch (LoopType)
|
||||
@ -158,7 +158,7 @@ namespace TomatenMusic.Music
|
||||
|
||||
if (type == LoopType.QUEUE)
|
||||
{
|
||||
QueueLoopList = new List<TomatenMusicTrack>(Queue.Prepend(LastTrack));
|
||||
QueueLoopList = new List<TomatenMusicTrack>(QueueLoopList.Prepend(LastTrack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,16 +93,15 @@ namespace TomatenMusic.Prompt.Implementation
|
||||
_ = args.Interaction.EditOriginalResponseAsync(new DiscordWebhookBuilder().WithContent("Please connect to the bots Channel to use this Interaction"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
await Player.RewindAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
}catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
|
||||
_ = args.Interaction.CreateResponseAsync(
|
||||
DSharpPlus.InteractionResponseType.ChannelMessageWithSource,
|
||||
new DiscordInteractionResponseBuilder()
|
||||
.WithContent($"An Error occurred during this Interaction {ex.Message}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ namespace TomatenMusic
|
||||
.AddSingleton(
|
||||
new LavalinkNodeOptions
|
||||
{
|
||||
RestUri = "http://127.0.0.1:2333",
|
||||
RestUri = "http://116.202.92.16:2333",
|
||||
Password = config.LavaLinkPassword,
|
||||
WebSocketUri = "ws://127.0.0.1:2333",
|
||||
WebSocketUri = "ws://116.202.92.16:2333",
|
||||
AllowResuming = true
|
||||
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user