OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
1.78k stars 117 forks source link

Artist not sorting properly - Seems to be caused by ALBUMSORT tags #760

Closed bryanparadis closed 16 hours ago

bryanparadis commented 3 weeks ago

Describe the Bug/Crash

You can see that Katatonia and Shlohmo are both in the D section. Shlohmo has extended artistsort field in tag but it is set to Shlohmo. Katatonia has extended artistsort field in tag but it is set to Katatonia. I saw a previous issue where this extended field had some other value in it but this isn't the case here. Everything has been manually tagged with mp3tag.

Looking further it seems like it's to do with m4a files from itunes which do have sort tags. After looking at about 5-6 examples I can confidently say that it is because the artists have an album that begins with that letter so it's related to the ALBUMSORT tag.

Describe the intended behavior

Should actually sort by Name Ascending.

What android version do you use?

Android 13

What device model do you use?

Fairphone 4

Provide a sample file

Can provide privately if actually needed.

Bug report

Can provide if actually needed.

Duplicates

bryanparadis commented 3 weeks ago

I edited one of the Vitalism track's ALBUMSORT tags and changed it to "0testing" to see if I could get it to appear at the top of the Artist list and it did.

bryanparadis commented 3 weeks ago

Could not reproduce with a MP3 by adding albumsort to the tag and rescanning library. Seems to do with MP4/M4A and albumsort specifically. I had a look through the source for TSOA/soal/albumsort/artistsort but couldn't find any smoking gun. Removing the albumsort field from the mp4 tag fixes the issue.

bryanparadis commented 3 weeks ago

Saw that you were using androidx.media3.exoplayer.MetadataRetriever so I thought I would take a quick look at the Android source and found someting interesting. Those seem all rather mixed up. It's 2am but I rechecked a few times.

Opened an issue over there:

https://github.com/androidx/media/issues/1302

OxygenCobalt commented 3 weeks ago

Huh, I thought this would be another "I don't realize I have sort tags" issue, but instead it's a legit media3 bug. For now I can patch this myself easily since I vendor media3. Can I have a sample file @bryanparadis? Just e-mail me one w/no copyrighted audio.

bryanparadis commented 3 weeks ago

Huh, I thought this would be another "I don't realize I have sort tags" issue, but instead it's a legit media3 bug. For now I can patch this myself easily since I vendor media3.

Glad I could surprise you! Haha. Funnily enough finding bugs in third parties is kind of my thing.

Can I have a sample file @bryanparadis? Just e-mail me one w/no copyrighted audio.

Sent a couple your way

bryanparadis commented 3 weeks ago

@OxygenCobalt A fix commit already upstream!

OxygenCobalt commented 3 weeks ago

Okay, I'll cherry-pick it when I get the chance @bryanparadis. Thanks for reporting this!

bryanparadis commented 3 weeks ago

Okay, I'll cherry-pick it when I get the chance @bryanparadis. Thanks for reporting this!

Glad I was able to contribute. Cheers