Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8f701a34 authored by Paul Keith's avatar Paul Keith
Browse files

Eleven: Fix sorting by track number in albums

* We have to cast the track number column value to an int
* This makes track numbers sort numerically (i.e. 1, 2, ..., 10, ...)
  rather than lexically (i.e. 1, 10, ..., 2, ...) in the album view
* This doesn't seem to affect all albums for whatever reason:
  albums with m4a tracks seem to be sorted wrong whereas ones
  with opus tracks are seemingly fine even without this change
* The root cause here is that the TRACK column seems to be a string,
  but not one that is padded to a fixed length to allow lexical sorting.
  Note that this appears to be contrary to the documentation at:
  https://developer.android.com/reference/android/provider/MediaStore.Audio.AudioColumns#TRACK
  which says that the column is stored with FIELD_TYPE_INTEGER

Change-Id: I0bb1ce7a45b42ba58e7aab26d17572f9a71b6ff8
parent fa65c2a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment