View Single Post
Old 12-02-2010, 06:35 AM   #14
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by chilady1 View Post
From the bottom of my heart THANK YOU SO MUCH, this has been driving me crazy from forever. I have been manually changing this and now with this solution - done! I knew there was a way to do this within the system just never had the time to figure it out and besides, I never would have messed with the Tweaks without some help. Unlike Lady, all of my authors are already LN, FN so I don't have to fix that issue, but going forward, just knowing all books added will be the way I want is invaluable.
You are welcome, glad it was helpful. Just trying to "pay it forward" from the help others have given me here in these forums.

One last point for you and others to make this thread complete, since it sounds like you have been manually overtyping things for a while. After applying the tweak you might become a "victim" of a quirk of how Calibre stores the author sort data that I haven't gone into detail on before now. Here's the long story as I understand it.

Calibre stores the author_sort values in two places. Once in a table that says for each author what it's sort should be. That makes sense, and is what you change via the "Manage authors" dialog. Think of this as the "default" sort value that will be applied when you add a new book for that author name.

However Calibre also stores an author_sort value with each and every single book. Ordinarily this will be identical to that stored for the author, in fact I can't think of a situation where you would want them to be different. Ever go into the Edit Metadata dialog and see the author sort box be red? That means the sort value stored for the book differs from the sort value stored for the author. If you are sure the value stored on the book is how you want it despite the box being red, that is a sign you need to go into the "Manage Authors" dialog and change the default for that author.

Why does Calibre store at book level as well at author level? That I have no idea on. The only reason I can think of as a performance optimisation - compared to the grief it causes I hope it was worthwhile It drove me insane to find say some books by "Smith, James" sorted under J and the rest under S when this went wrong for me in the early days of my using Calibre (even though both displayed the author as "Smith, James").

So... how does it go wrong and what can you do about it? Well for me it was a combination of changing the tweak and then manually changing book authors without changing the their default in the "Manage Authors" dialog. It could also be that you added some authors in LN, FN format before the tweak (so their author_sort was inverted to be FN, LN by default). Hence I ended up with a mish-mash mess which only a trip to the forums saved my insanity from.

Moral of the story. If you decide to go with this tweak don't forget to visit the Manage Authors dialog and make sure the values in there reflect what you want. If you focus on getting the "Author" column correct, you can then click the "Recalculate all author sort values" box to get it to *copy* all the author values to author sort, since you usually want them to be identical. Then when you click OK, Calibre will actually go update all of the books for each of those authors, so that the author_sort stored on each book is the same as that default value you just set for the author. From that point onwards you should rarely need to visit that dialog again.
kiwidude is offline   Reply With Quote