Playlists using UTF-16 encoding sometimes don't load
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
### Bug Description
As mentioned on discord, the MusicBot seems unable to handle more than 128 .txt files in the Playlists folder.
### Steps to Reproduce
1. Add more than 128 files to Playlists folder
2. Run playlist command on Discord
3. Only returns 128 Playlists, also can't play playlists outside this range
Example Files in Explorer:

Example Playlist Command:

Example Error when trying to play a playlist outside of the 128 range:

### Expected Result
I expect to be able to play any playlist regardless of the quantity of playlists in the playlist folder.
### Debug Output
```shell
System Properties:
java.version = 17
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.version = 17
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 17+35-LTS-2724
java.specification.version = 17
os.arch = amd64
os.name = Windows 10
JMusicBot Information:
Version = 0.3.5
Owner = 209240452371578880
Prefix = !
AltPrefix = null
MaxSeconds = 0
NPImages = false
SongInStatus = true
StayInChannel = true
UseEval = false
UpdateAlerts = true
Dependency Information:
JDA Version = 4.3.0_312
JDA-Utilities Version = 3.0.5
Lavaplayer Version = 1.3.78
Runtime Information:
Total Memory = 56
Used Memory = 16
Discord Information:
ID = 888173169964355604
Guilds = 1
Users = 2
```
```
### Additional Info
The playlists seem to be loaded alphabetically. I have also tried creating new playlists that fall at the start of the list e.g. "01 Test.txt". Adding these reduces the playlists discovered, always maintaining 128.
### Checklist
- [X] I have looked for information about this [within the documentation](https://jmusicbot.com/)
- [X] I have searched for similar issues [on the issues page](https://github.com/jagrosh/MusicBot/issues?q=is%3Aissue)
- [X] I am running the latest version of the bot: 
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the playlist command and the code that loads .txt files from the Playlists folder; the issue does not name specific files or tests. Reproduce the problem with more than 128 playlists, then verify that every playlist is listed and playable regardless of filename or position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100