I've updated my music player code to v2.0.4! An update to a certain ghost is pending, and as a result, I ended up finding another round of bugs and such to fix...
I figured this would be a really small patch, but it ended up having more fixes than I expected! Some of them are subtle things, and some less so, depending on how you use it. Also, a little bit of cleanup work. Go figure, I found a function I probably wrote years ago, and once I parsed what it was doing I physically recoiled in horror... I couldn't just leave it like that, so I rewrote it and made it better. And I left comments this time! Time well spent, even though the end result of it is exactly the same as before.
Changelog:
Fixed an issue where pushing balance further left than -100 would cause it to snap to the center.
Fixed the "stop after current song" and "stop after playlist end" flags not being cleared if playback ended while the ghost was minimized.
Fixed an issue where changing the options (volume, balance, speed, etc.) while the music menu was open would cause it to stop updating that display.
Fixed an issue where if the currently playing song was removed from the playlist, the options (volume, balance, speed, etc.) could not be changed until another song played.
Fixed an issue where pressing the "previous" button to restart the current song would make playback stop if the song had been removed from the playlist.
Fixed an issue where if the currently playing song was removed from the playlist, it would not show up in the stat share notify event.
Adjusted the behavior around play order after removing songs. If the playlist is set to loop, the place in the playlist will be preserved and it will continue to the next song.
Fixed an issue where sometimes the shuffle queue would have an extra entry after new songs were added.
Fixed an issue where the shuffle queue would sometimes shuffle an additional time when removing songs from the playlist.
Overhauled the MusicPlayer.ShufflePlaylist function to make it clearer and simpler.
The buttons for loading / deciding not to load a playlist now have linebreaks between them for a nicer display and to avoid misclicks.
Added a plural check to the count of songs in the current playlist that is seen in the settings.
Added an extra linebreak before the Discord toggle and fixed a missing choice marker.
Fixed flicker issues in various menus.
Fixed incorrect balloon and scope calls in various places.
Adjusted some sakurascript formatting for clarity and to avoid bugs.