View Single Post
Old 09-06-2014, 10:15 PM   #35
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quick'n dirty 4AM patch that should handle everything...

Is probably terribly ugly.

Should take care of detecting the FW version properly, although someone on FW 5.4.0 should nerf is_cc_aware to check if the patch-level to check for is really 5.4.2 and not 5.4...

That function should probably have a better name, too (is_cloud_aware?).

Left my mess of printfs in.

Also left a bunch of WIP FIXMEs that probably turned out to be stupid and useless ideas on my part. (@barsanuphe: Getting a db uuid from our cdeKey is enough, since the rest of the fields are okay in the db, we only needed to match the cdeKey from the json to a db uuid).
That also means the reasoning behind the last edit in my previous post is somewhat bogus. The 'wrong' part whas ID'ed properly, but my explanation of the fix is wrong (I was thinking in terms of the raw SQL db, and not what ccat does/expects).

TL;DR: Should be better, but in the name of all that is holy, BACK YOUR CC.DB UP FIRST!

----

Did NOT touch the export at all, so it's still in the LibrarianSync format.

----

As for the speed:

Pro: LibrarianSync is super-fast!
Con: The Kindle's JSON over HTTP to SQLite through lua backend isn't. The vast majority of the time the script takes to run is spent waiting for ccat to do its thing.

With ~500 items stored (json db is 45KB), it takes ~40s to complete on a Touch. That's still faster than CM, if memory serves me.

That means we probably should wrap the KUAL button in a shell wrapper with visual feedback of the progress.

----

Anyway, that's it for tonight, gonna treat me to the latest Doctor Who as a reward, because it's already 4AM, so eff it, why the hell not ;p.

Last edited by NiLuJe; 09-07-2014 at 06:07 PM. Reason: Remove deprecated attachment ;)
NiLuJe is offline   Reply With Quote