jagrosh / jagrosh/MusicBot

[Bug Report] Filenames with special characters not playing, directly or in M3U file.

Open
#732 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
5.8k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Replace this text with a clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Have a music file with special characters such as é
2. Attempt to play this (from M3U file or directly with directory)
3. "No matches found." Or it searching on YouTube

**Expected behavior**
The specified music file plays correctly.

**Screenshots**
![2021-07-29_13-02](https://user-images.githubusercontent.com/56408488/127481340-f1b3d3d0-4a7f-4cfb-b46b-774960df7028.png)
Here you can see me attempt to load a playlist, however every song with the "é" character in it (Like in Pokémon) fails.
I then try to play this song directly, this also fails and it then fetches the song from YouTube. I know this because it takes a while longer and is the new version of the cover, even though I specified the file of the old one.
I then to show that it does work with normal files try to play a song with no special characters, this plays just fine and is instant, so it did not seem to get it from YouTube or anywhere else.

**Debug Info**
```
System Properties:
java.version = 16.0.1
java.vm.name = OpenJDK 64-Bit Server VM
java.vm.specification.version = 16
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 16.0.1+9
java.specification.version = 16
os.arch = amd64
os.name = Linux

JMusicBot Information:
Version = 0.3.4
Owner = 295273085236412417
Prefix = ch
AltPrefix = null
MaxSeconds = 0
NPImages = false
SongInStatus = false
StayInChannel = false
UseEval = false
UpdateAlerts = true

Dependency Information:
JDA Version = 4.2.1_253
JDA-Utilities Version = 3.0.5
Lavaplayer Version = 1.3.75

Runtime Information:
Total Memory = 80
Used Memory = 27

Discord Information:
ID = 870063988120105020
Guilds = 1
Users = 2
```

**Additional context**
These are files played from my local hard drive. The files are stored in `/storage/files/Music`. To get the playlists, I get my .m3u files and rename them to .txt.
The files are encoded with UTF-8 and the same file plays fine in VLC.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing local playback and M3U loading with a UTF-8 filename such as “Pokémon,” comparing it with a filename without special characters. Trace the local-file and playlist playback paths; done means those files play directly without a “No matches found” result or an unintended YouTube search.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.