Implemented Card
https://cloud.tomatentum.net/apps/deck/#/board/19/card/229
This commit is contained in:
parent
3bdb592671
commit
90514e8e62
@ -134,7 +134,6 @@ namespace TomatenMusic.Music
|
|||||||
|
|
||||||
public async Task PlayPlaylistNowAsync(LavalinkPlaylist playlist)
|
public async Task PlayPlaylistNowAsync(LavalinkPlaylist playlist)
|
||||||
{
|
{
|
||||||
|
|
||||||
EnsureConnected();
|
EnsureConnected();
|
||||||
EnsureNotDestroyed();
|
EnsureNotDestroyed();
|
||||||
if (!PlayerQueue.Queue.Any())
|
if (!PlayerQueue.Queue.Any())
|
||||||
@ -159,6 +158,14 @@ namespace TomatenMusic.Music
|
|||||||
|
|
||||||
public async Task RewindAsync()
|
public async Task RewindAsync()
|
||||||
{
|
{
|
||||||
|
EnsureNotDestroyed();
|
||||||
|
EnsureConnected();
|
||||||
|
if (Position.Position.Seconds < 4)
|
||||||
|
{
|
||||||
|
await ReplayAsync();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MusicActionResponse response = PlayerQueue.Rewind();
|
MusicActionResponse response = PlayerQueue.Rewind();
|
||||||
|
|
||||||
_logger.LogInformation($"Rewinded Track {CurrentTrack.Title} for Track {response.Track.Title}");
|
_logger.LogInformation($"Rewinded Track {CurrentTrack.Title} for Track {response.Track.Title}");
|
||||||
@ -168,6 +175,8 @@ namespace TomatenMusic.Music
|
|||||||
|
|
||||||
public async Task SkipAsync()
|
public async Task SkipAsync()
|
||||||
{
|
{
|
||||||
|
EnsureNotDestroyed();
|
||||||
|
EnsureConnected();
|
||||||
MusicActionResponse response = PlayerQueue.NextTrack(true);
|
MusicActionResponse response = PlayerQueue.NextTrack(true);
|
||||||
|
|
||||||
_logger.LogInformation($"Skipped Track {CurrentTrack.Title} for Track {response.Track.Title}");
|
_logger.LogInformation($"Skipped Track {CurrentTrack.Title} for Track {response.Track.Title}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user