View Single Post
Old 02-14-2016, 05:45 AM   #39
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,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Purple Lady View Post
I'm preparing to test the latest, so I'm looking at these problem books. All the ones that had an error because it couldn't delete the current file actually did copy to the new location, it just didn't delete the old. I don't know if this is expected behavior, but it makes things easier for me. I can just delete all books from external SD and re-download the one not found.
Re not deleting the files: no, that isn't intended behavior and it isn't behavior that I see. I suspect that it happened for you because of the various path name changes in the alpha releases. A book file could have been orphaned.
Quote:
Originally Posted by Purple Lady View Post
I re-downloaded my one book, but the path looks wrong. In addition to substituting a period to underscore it also changed the comma to underscore. See the two Konrath folders in the screenprint.
Attachment 146341
I decided to spend the time to determine what calibre does to paths and, if possible, do the same thing in CC.

Calibre first "ascii-ized" the text, getting rid of non-Latin characters. CC won't do this.
  1. Calibre next changes the following characters to underscores -- characters that are not:
    • letters, numbers, or a space
    • !, $, %, ^, &, (, ), =, -, {, }, \, [, ], @, ~, ', #, comma, period, _, and /.
  2. Calibre next changes any leading period to an underscore and removes all trailing periods.
  3. Finally, calibre removes any empty path segments, e.g., aaa//bbb becomes aaa/bbb.
CC now does these things as well.

CC will optionally remove accents from characters.

These changes deal with the comma -> underscore problem. It won't happen any more.
Quote:
Originally Posted by Purple Lady View Post
I just tried moving my one azw3 file to the external SD, and the path created still had the missing period at the end. I am using alpha 3.
Attachment 146342
This implies that you didn't resend the book or that the "replace" option is not checked, because CC alpha 3 would not leave that dot in the folder name.
Quote:
Originally Posted by Purple Lady View Post
I just noticed that this release also puts underscores in the book file name as well. Was that intended? If the book file name changes, it means that syncing reading positions won't work anymore. I really rely on that.
Attachment 146343
Yes, it is intended, for two reasons. 1) The "illegal" characters must be changed but not removed in order to prevent the path segment from becoming zero length. 2) That is what calibre does.

Assuming you are using a CC template, the file names will be the same if you are running the CC V5 on all devices and if you resend all your books to every device. Why? CC V5 generates a different name than CC V4. If you don't resend the files then some books will have the V4 name and some will have the V5 name.

For testing, and again assuming you are using CC's templates, I strongly suggest
  • that you use the "Replace existing book files" option
  • that once you receive the next alpha (alpha 4, to be released today), you resend from calibre all the books on the device.
This will ensure that all the books have the "correct" path and that you don't end up with multiple copies of books in CC.

FYI: here are the scenarios I have tested:

On Android 4.3 w/o an SD card (Galaxy Nexus)
  1. Uninstall CC
  2. Delete all book folders
  3. Install CC. Change no settings except to allow azw3
  4. Connect to calibre
  5. Send some books: 5 epub, 2 mobi, 1 azw3. One epub (the "strange" one) has
    Code:
    title="Unknown !"$%^&*()_+=-{}[]@~'#<>?,./\|",
    author="Unknown 222g. A.....".
    This tests all the character substitution. It will also test the removal of periods in folder names.
  6. When sending the strange epub calibre sent the path
    Code:
    Unknown !_$%^&_()__=-{}[]@~'#___,.___ - Unknown 222g. A__. - (1412).epub
  7. Disconnect
  8. Check for missing books: none found
  9. Turn on CC templates with template {title} - {authors}. Check the replace existing book files option
  10. Connect to calibre. Send the strange book again. CC warns me that calibre might show the wrong number of books, which happens because the path to the book changed during the send.
    Code:
    Orig calibre path is = Unknown !_$%^&_()__=-{}[]@~'#___,.___ - Unknown 222g. A__. - (1412).epub
    Template gen'ed path = Unknown !_$%^&_()__=-{}[]@~'#___,.___ - Unknown 222g. A.epub
    We can see that CC's template generated the same title and author string for the template as calibre did, with the exception of the book id what isn't in CC's template.
  11. Disconnect.
  12. Change the template to {authors}/{title} - {authors}.
  13. Reconnect. Send the strange book again.
    Code:
    Template gen'ed path = Unknown 222g. A/Unknown !_$%^&_()__=-{}[]@~'#___,.___ - Unknown 222g. A.epub
    We see that the trailing dots of the authors name are gone from the folder.

On Android 5.1 with an SD card(Amazon Fire):
All of the above steps produced the same results. Next are the SD card tests.
  1. Use CC Formats and Folders to move mobi and azw3 to /CC on the SD card. ES File Explorer says that the files are now on the SD card and have been deleted from main memory. The folder for the strange book still doesn't have a trailing period.
  2. In CC, delete the azw3 book. ES File Explorer says the book is gone.
  3. Connect and resend the azw3 book.
  4. The book appears on the SD card in CC using the CC template to create an author folder.
  5. Move the epubs to the SD card by changing the default folder in CC. ES File Explorer says the books are on the SD card and gone from main memory.
  6. Delete the strange book. ES File Explorer says the book and the author folder are gone.
  7. Connect and resend the "strange" book. The book appears and yet again the author folder has no trailing dots.
chaley is offline   Reply With Quote