View Single Post
Old 05-07-2020, 11:33 PM   #11
OrangeFlavored
Enthusiast
OrangeFlavored doesn't litterOrangeFlavored doesn't litter
 
Posts: 34
Karma: 100
Join Date: Oct 2014
Device: Likebook Mars
Turns out timestamps can be preserved if I tar everything before pulling it, so doing that now, seems faster this way anyway since I only have to pull a single file rather than hundreds of individual ones. Though I do have to be careful not to let the path get over 100 characters or it gives an error. Ran into that with a few files but for now just shortened everything enough that it's not a problem anymore.

Also changed my send to device template to append the book id to the end of each book so there's no need to search the database for each book based on title/author anymore, just uses the ID from the end of the folder name to lookup the book directly. I considered trying to mess with upload_books() to add this info to the metadata.epub.lua instead, but it seemed like generating this file for every book in my library at upload time might not be desirable for the moment so I put that idea off for now. Using a plugboard and writing the calibre db ID into the ebook's metadata could also be a potential option I guess, though depends on whether you consider it less intrusive to mess with the ebook's metadata vs sticking something in its filename. Personally I think the filename thing is fine for now since it also makes it less likely I run into an unintentional filename collision on my device or something.

Last edited by OrangeFlavored; 05-08-2020 at 05:16 AM.
OrangeFlavored is offline   Reply With Quote