View Single Post
Old 08-31-2010, 10:17 AM   #5
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: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by anthony.burton4 View Post
I have 2 books by J A Jance. I have been trying to set the Author to "Jance, J A", and that's how I want it sorted too, so I want the same value in the Author Sort field.

I have tried the tweak to "Copy" the author field into the AUthor sort field, but this doesn't seem to work as I expected
Could you indicate what it is you expect, and what it is doing? Also, note that for tweaks, case matters. The value must be 'copy', not 'Copy'.
Quote:
, so I have stuck with manually entering the value each time - this works and I end up with the same value in both fields which I what I want, but for some reason, the Author sorting still ignores this. So although the value in the author sort field is also "Jance, J A", it appears at the top of my list as though it was still the "previously" auto-generated Author sort value of A, Jance, J.

I double check this by examining the meta data of each of the two books, and the AuthorSort field IS correctly set, so is there a 3rd "hidden" field somewhere containing the real data that Author sort uses??
Books and authors each have author_sort fields. You set the value for a book using the edit metadata functions. You set the author_sort for an author using the method that dwanthy pointed out.

When a new author is entered, calibre computes that author's sort value and stores it with the author. The tweak you mention is used to control how the value is computed.

When a book's author_sort value must be computed (new book or user request), calibre uses the following steps:
1) Get the list of authors for the book.
2) For each author, get its author_sort value
3) Concatenate all the author_sort values in the correct order
4) Store the result into the book's author_sort.
Quote:
Can I add that the checkbox to "Automatically set Author sort field" appears to do the opposite of what it suggest, I would assume that not checking this would mean that the author sort value is whatever I type, when in fact I have to check the box in order to manually enter data and have it retained.
I confess to being confused by this paragraph.

From your description, I assume you are using the bulk metadata dialog. My experiments show it behaves as follows:

a) Check box is not checked.
Whatever I type into the author_sort text box is stored with the books being edited.

b) Box is checked and author_sort box is empty.
The author_sort value for the books is recomputed from its authors. The steps are:
1) Apply the author changes, if any.
2) Compute the book's author_sort as described above.

c) Box ix checked and author_sort is not empty.
Same as a). The check box is ignored.

What different behavior are you seeing?
chaley is offline   Reply With Quote