Skip to content

Commit

Permalink
handle single song playlists
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Jun 23, 2024
1 parent 500844a commit f718a75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Scripts/OpenTS2/Audio/MusicCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public Song PopNextSong()
{
var song = CurrentPlaylist[0];
if (CurrentPlaylist.Count <= 1)
{
InitializePlaylist();
if (CurrentPlaylist.Count <= 1)
return song;
}
CurrentPlaylist.Remove(song);
return song;
}
Expand Down

0 comments on commit f718a75

Please sign in to comment.