sosauce / CuteMusic

CuteMusic is a simple,lightweight and open-source offline music player app for Android.
GNU General Public License v3.0
141 stars 12 forks source link

UTF-8 Characters Break CuteMusic #25

Open quantenzitrone opened 3 weeks ago

quantenzitrone commented 3 weeks ago

Describe the bug I have mp3 songs by ๐”oon ๐”‡eity. The ๐” and ๐”‡ is shown as ???? in the app. Trying to play them freezes CuteMusic.

$ python3
>>> import mutagen
>>> f = mutagen.File('myfile.mp3')
>>> f.get('TPE1')
TPE1(encoding=<Encoding.UTF8: 3>, text=['๐”oon ๐”‡eity'])

To Reproduce Obtain an mp3 with non-ASCII UTF-8 encoded metadata and try to use it in CuteMusic.

Expected behavior Proper Unicode handling.

Screenshots

Smartphone (please complete the following information):

Additional context

sosauce commented 3 weeks ago

Hello, I've tried running the python code but I've been getting the below error, I have no knowledge in Python

image image

quantenzitrone commented 3 weeks ago

line 6 is not code it is the output of line 4 My code was meant to illustrate and prove the UTF-8-ness of my ID3 tags.

quantenzitrone commented 3 weeks ago

im not sure if you get any output if you run it as a script, i ran it in a python repl

sosauce commented 3 weeks ago

Oh, well when I modified the title of a mp3 file using another app (using the exact characters you gave me) the app worked fine ๐Ÿค”

quantenzitrone commented 3 weeks ago

try https://quantenzitrone.eu/filehost/wake%20up!.mp3

i can't upload mp3s to github so i put it on my vps

sosauce commented 3 weeks ago

Mhmm, works fine on both of my phone (One is running CrDroid Android 14, the other one is MIUI 14 Android 13) I think the issues is coming from your OS

quantenzitrone commented 3 weeks ago

Android 8.1 :grimacing:

When I go into the system settings and Storage > Music & audio > Audio files, my phone opens the AOSP file manager, which also shows ๐”oon ๐”‡eity as ????oon ????eity. I'm guessing this uses the same API as Cutemusic and my phone has a bug in that API. The app responsible for provding this music file index is com.android.providers.media. While fiddling, I actually managed for cutemusic to freeze on any file, and after clearing this app's data (which you probably shouldn't do) the freezing problem went away. But ๐”oon ๐”‡eity hasn't been indexed again yet, so I don't really know. I'll try fiddling around a bit more. I still think the freezing might be a bug. Maybe some unhandled exception.

sosauce commented 3 weeks ago

Probably yes, I'll add a workaround. Do you have any logs of when the app freezes ? This would let me know what error to catch

quantenzitrone commented 3 weeks ago

how do i get logs of freezes? I have scoop that catches ~logs of crashes~ stack traces, but freezes?

sosauce commented 3 weeks ago

It should do it, I just want to see what happens during runtime so scoop should do it