View Single Post
Old 02-15-2016, 02:54 AM   #49
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
@jackie_w: this stuff is extremely complicated. The problem is that because of history and because of desire for compatibility, CC and calibre options overlap and affect each other. In addition, "sending a book" behavior changes if the book is already on the device. For example, by default calibre will reuse an existing file name for a book no matter what the calibre template says. The same is true for CC's content server and cloud connections, assuming that no options are selected in CC's File name settings. If I were starting over and if I knew what I know today, CC would support *only* the CC template option.

I strongly suspect that you did not delete the books off the device between test 1 and test 2. This means that when you sent the book from calibre using the wireless device, calibre reused the file name from the first test. CC sees a file name that exists and is identical to what is there, so it is happy to use it. In other words, the calibre template was ignored.

When you pulled a book using the content server via book details, CC generates a file name. I see that there is a very longstanding bug here in that CC ignored the "calibre template" option you set. Because "Replace" was checked, CC's generated file name replaced the previous name. Had you pulled the book by long-pressing (which you couldn't because the book was already on the device), the option would have been respected and the calibre-generated name would have replaced the CC name. Given the behavior of the wireless device, it is not clear that this is good behavior.

My head hurts when trying to work through all of this.

One thing is sure: the fact that the calibre-generated file name is ignored when the option is set and downloading from content server book details is wrong.

I am considering whether the replace option should be checkable only if templates are in use. Given the cross-product of the calibre file name options and their behavior, I suspect not. Explaining when a file name is reused and when a file is replaced is next to impossible.

I am also considering whether I should make "Use templates" and "Replace files" the default for new CC installs. This would have the nice property that the same file name would be used everywhere and that CC would emulate the calibre wireless device behavior of "reuse filenames". If I do this then I would make CC's default template be "{title} - {authors} ({id})", which is the calibre default.

More when I get back (next post).
chaley is offline   Reply With Quote