Implemented Card

https://cloud.tomatentum.net/apps/deck/#/board/19/card/229
This commit is contained in:
Tim Müller 2022-03-20 18:45:12 +01:00
parent 3bdb592671
commit 90514e8e62

@ -134,7 +134,6 @@ namespace TomatenMusic.Music
public async Task PlayPlaylistNowAsync(LavalinkPlaylist playlist)
{
EnsureConnected();
EnsureNotDestroyed();
if (!PlayerQueue.Queue.Any())
@ -159,6 +158,14 @@ namespace TomatenMusic.Music
public async Task RewindAsync()
{
EnsureNotDestroyed();
EnsureConnected();
if (Position.Position.Seconds < 4)
{
await ReplayAsync();
return;
}
MusicActionResponse response = PlayerQueue.Rewind();
_logger.LogInformation($"Rewinded Track {CurrentTrack.Title} for Track {response.Track.Title}");
@ -168,6 +175,8 @@ namespace TomatenMusic.Music
public async Task SkipAsync()
{
EnsureNotDestroyed();
EnsureConnected();
MusicActionResponse response = PlayerQueue.NextTrack(true);
_logger.LogInformation($"Skipped Track {CurrentTrack.Title} for Track {response.Track.Title}");