- fixed PlayNow issue
This commit is contained in:
parent
5a9d978b5e
commit
0024325f4f
@ -44,7 +44,9 @@ namespace TomatenMusic.Music.Entitites
|
||||
if (!player.PlayerQueue.Queue.Any())
|
||||
player.PlayerQueue.CurrentPlaylist = this;
|
||||
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
if (!withoutQueuePrepend && player.State == PlayerState.Playing)
|
||||
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)
|
||||
if (!withoutQueuePrepend && player.State == PlayerState.Playing)
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
|
||||
|
||||
|
@ -57,7 +57,9 @@ namespace TomatenMusic.Music.Entitites
|
||||
if (!player.PlayerQueue.Queue.Any())
|
||||
player.PlayerQueue.CurrentPlaylist = this;
|
||||
|
||||
player.PlayerQueue.Queue = new Queue<TomatenMusicTrack>(player.PlayerQueue.Queue.Prepend(new TomatenMusicTrack(player.PlayerQueue.LastTrack.WithPosition(player.TrackPosition))));
|
||||
if (!withoutQueuePrepend && player.State == PlayerState.Playing)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user