Use natural sort for filenames

Feature requests for the GTK+ version of Transmission
dtrauma
Posts: 1
Joined: Tue Nov 03, 2015 9:09 pm

Use natural sort for filenames

Postby dtrauma » Tue Nov 03, 2015 9:27 pm

Hello,

I think it would be really nice if Transmission would sort filenames in natural sort order, that is keeping numerical order intact even if numbers don't have leading zeros. So, instead of the current behaviour:

  • Ep10
  • Ep11
  • Ep1
  • Ep20
  • Ep21
  • Ep2
  • Ep3

I'd (and probably most people) would like to see this:

  • Ep1
  • Ep2
  • Ep3
  • Ep10
  • Ep11
  • Ep20
  • Ep21

Theres a function in GNU libc called strverscmp that sorts exactly like this, and it even is used in other GTK+ programs (as far as a quick google tells me), so it should be possible to lift the code from some other FLOSS project.

Return to “GTK+ Requests”