Commit graph

16 commits

Author SHA1 Message Date
Tom Jaspers
18bd4471e4 Fix sorting of track numbers when case insensitive
`LOWER()` implicitly converted numerical columns to strings,
causing the ordering of ['1', '10', '2'] to be correct.

The type of the column is now checked in the sql query
using `CASE WHEN..` construct. This ensures the column is
only `LOWER()`'d when dealing with TEXT or BLOB.

- Add a test to check for the track number behavior
- Add changelog entry

Fix #1511
2015-07-05 19:56:14 +01:00
Lucas Duailibe
df89a68a99 Fixing sort by path (fix #1451) 2015-05-07 23:45:26 -03:00
Tom Jaspers
24e6ba3de8 Tests for case insensitive sort
- Changed old values to be capitalized (more natural)
- Introduced specific tests for case sensitivity which adds lower-values
2015-04-18 11:22:01 +02:00
Bruno Cauet
53c21330c2 All tests use unicode_literals 2015-01-20 15:58:02 +01:00
Bruno Cauet
9c41c39913 Do __name__ comparison with bytes and not unicode 2015-01-20 12:03:57 +01:00
Bruno Cauet
90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
2902cda036 tests: use absolute imports everywhere 2015-01-19 12:25:15 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48 Happy 2015. ;)
See 7a410f636b

Command used:

    git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Adrian Sampson
5f2ca0b75b Rename smartartist to artist/albumartist (#953)
This is basically always what you want, so now you can just use the name of
the field without "smart".
2014-09-16 14:53:16 -07:00
Adrian Sampson
2795a01e28 Default sort configuration is global (#953)
It would be nice to cache the Sort object so we didn't have to re-parse this
every time...
2014-09-16 14:34:21 -07:00
Adrian Sampson
4870d7e0fa Roll back fast flexible field sorts (#953)
Sad to see them go, but happy be rid of the SQL injection.
2014-09-13 17:16:12 -07:00
Adrian Sampson
bb4082fbfc Style cleanup in sorting 2014-09-12 20:58:25 -07:00
Pierre Rust
18539b0bd1 Fix flake8 warnings. 2014-06-15 22:32:26 +02:00
Pierre Rust
69213ad574 Add tests for computed attributes. 2014-06-15 22:32:26 +02:00
Pierre Rust
728797718e Add tests cases for sort on albums.
On fixed and flex attributes.
2014-06-15 22:32:26 +02:00
Pierre Rust
ad1c0b3831 Add unit tests for fixef and flex field sort 2014-06-15 22:32:26 +02:00