View Single Post
Old 12-21-2010, 01:06 PM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jackie_w View Post
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.
chaley is offline   Reply With Quote