Use natural sort for filenames

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

Use natural sort for filenames

Post by dtrauma »

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.
Post Reply