View Single Post
Old 12-18-2010, 03:46 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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thank you for both things. You did guess correctly on the debug log. On that topic, 0.7.34 has an easier way to do it, directly from the gui. Start calibre, then go to the preferences pulldown and select 'restart calibre in debug mode'. Calibre will restart. When next you quit, you will be presented with a window showing the log.

The debug log shows that everything I expected to happen, did.

As for the databases, I am mystified. There is no explanation there for how the 650 could decide to sort "The Hobbit" by 'H'. I am beginning to wonder if it is ignoring the database and using the metadata from the books themselves. Doing so would be slow. It would, however, explain what is happening. If you wish to play, you can test this. Duplicate your device_db plugboard, using format 'epub' and destination 'PRS505'. Next, resend The Hobbit. If it is sorted correctly, then we have strong evidence that the 650 is getting its info from the OPF in the epub instead of from its DB. Note that the title in the epub's OPF is really changed, so the file can't serve as a backup.

Another explanation, perhaps more probable, is that the 650 is doing article stripping, removing 'A' and 'The' before sorting. You can test this by using the plugboard to replace the blanks with the '_' character, which should defeat the matching algorithm. Start with the title_sort field. If changing that has no effect, then do both title_sort and title. The plugboard would look like:
Code:
device_db:PRS505 = (
[{author_sort}] -> authors), ([{series:lookup(\s,#serinit,series)}{series_index:>2s|| - }{title}] -> title), 
([{series}{series_index:0>2| | - }{title:re( ,_)}] -> title_sort)
Note that the re call is re(SPACE,UNDERSCORE).

Thanks again for your help!
chaley is offline   Reply With Quote