View Single Post
Old 11-08-2011, 10:26 AM   #19
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
Note that the bug fixed might not be what you think it is.
I should probably look at the code, but since you have a handle on it, I'll ask first.
Quote:
The problem was that calibre was not consistent is setting author_sort for 'null' authors. The GUI set author_sort correctly,
By "correctly" do you mean that the GUI entered "Unknown" into both author and author_sort or do you mean that it entered Unknown into Author (instead of null) and entered whatever was specified for author_sort (null, Unknown, or something else) into author_sort? I suspect the latter.

Quote:
but it was erased when copied to one of the subprocesses such as save-to-disk or send-to-device.
By "erased" do you mean:
1) a null author caused a null author_sort regardless of how author_sort was set, (I'm not sure how this could happen - null authors weren't allowed) or
2)an Unknown author caused author_sort to be set to Unknown regardless of its value. Or what?
Quote:
This caused the author_sort value to be erased no matter what it was set to in the GUI or no matter what was in the database. The fix is to make the two processes consistent. Creating a metadata record for a book with a null author will now set author and author_sort to the same value, which is what the GUI does.
And that value is "Unknown" or the local language equivalent.
Quote:
There are at least two side effects. One is that changing the author_sort for a book with author "Unknown" will not have any effect on save/send.
So if I get this, if Author is "Unknown" in the db (which is what you get if you try to set it to null) and author_sort is something else (null or whatever) you always get author_sort set to "Unknown" on a save or send?

Quote:
If the author is null (Unknown), then the author_sort will be "Unknown" as well.
That seems to be what you said
Quote:
Setting the author_sort to empty for a book with a non-null author should work correctly. The empty author_sort will be passed around just like any other author_sort.
So the OP would still get his error on author_sort[0] if he set an author_sort to null for anything other than author=Unknown?

I think I know the answers after reading this several times, but just to be sure. Thanks in advance.
Starson17 is offline   Reply With Quote