Quote:
Originally Posted by jackie_w
Can you clear up a little confusion with the 2 new Collections? To repeat some info from post #1, all my existing Collections (from tags only) sort by author_sort, series, series_index, title by using a custom composite column, #coll505sort, with template
Code:
{author_sort:titlecase()} - {series}{series_index:0>2s| | - }{title}
with the calibre tweak:
Code:
sony_collection_sorting_rules = [(['*'], '#coll505sort')]
Are the 2 new Collections "special cases" which will ignore the tweak and work from first principles?
|
Yes, in the code you have. That code gets its values from the book as modified by the plugboard. By_author sorts by author_sort, then title_sort. By_title sorts by title, then by author_sort.
Looking at code, I have figured out how to pass the device_db values into the collections code, so the answer becomes 'somewhat'. When I release the code (assuming Kovid approves), the new collections will be hard-coded to sort:
by_author: device_db author_sort, then device_db title_sort. These will use plugboard values.
by title: device_db title_sort, then device_db author_sort, again using plugboard values.
I don't see any reason to provide user-settable sorting for these special collections, given their purpose. If someone wants something different from these, then they can do it with custom columns.