- fixed Song History not working anymore

This commit is contained in:
Tim Müller
2022-10-09 16:44:00 +02:00
parent 1fc3fae278
commit 5a9d978b5e
3 changed files with 10 additions and 9 deletions

View File

@@ -101,7 +101,7 @@ namespace TomatenMusic.Music
}
_logger.LogInformation($"Skipped Track {CurrentTrack.Title} for Track {response.Track.Title}");
await base.PlayAsync(response.Track);
await PlayNowAsync(response.Track, withoutQueuePrepend: true);
QueuePrompt.UpdateFor(GuildId);
}

View File

@@ -26,7 +26,7 @@ namespace TomatenMusic.Music
public TomatenMusicTrack LastTrack { get; set; }
public List<TomatenMusicTrack> QueueLoopList { get; private set; }
public List<TomatenMusicTrack> QueueLoopList { get; private set; } = new List<TomatenMusicTrack>();
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.NONE && Queue.Count == 0 || autoplay)
if (LoopType != LoopType.TRACK || (ignoreLoop && (Queue.Any() || 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>(QueueLoopList.Prepend(LastTrack));
QueueLoopList = new List<TomatenMusicTrack>(Queue.Prepend(LastTrack));
}
}
}