chr56 / Phonograph_Plus

A semi-active fork of kabouzeid/Phonograph -- a revived classic material designed music player for Android
GNU General Public License v3.0
379 stars 19 forks source link

[Bug] Some albums sorted incorrectly (string sort rather than numeric sort) #228

Open AntiSol opened 18 hours ago

AntiSol commented 18 hours ago

Bug Summary

I'm not sure whether this is related to https://github.com/chr56/Phonograph_Plus/issues/227 or not It seems that some albums (especially the one for this I'm seeing the above bug) are not sorting correctly according to numeric track numbers, but are sorting as if track numbers were strings. For example:

1 track 1
10 track 10
2 track 2
20 track 20
21 track 21
3 track 3

etc, rather than the expected numeric track order of 1, 2, 3, 10, 20, 21.

screenshot: Screenshot_20241002-193101

Note that this only happens with some albums. I suspect that maybe it's albums which only have an id3v2 (not both v1 and v2), but I haven't been able to confirm this.

Version

1.8.4

Steps to reproduce the bug

No response

Environment

No response

Screenshots or Screen recordings

No response

Other helpful information

No response

chr56 commented 16 hours ago

I could not reproduce (on Android 14). It looks that it is device-specific. We read from MediaStore database of OS and sort them by database as well. It may stored as String instead of Integer on these lower platforms.

But there is a workaround in 54f4832d which sorting it again.