View Single Post
Old 07-02-2011, 07:24 AM   #63
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by Mackx View Post
That is a brilliant move, using the unique file_id from global.db.
This was my first idea, but main problem was that model doesn't know about files id. Thus I used the md5 hash for path/filename. But this is only on-way.
Adding id to model required changing some of the db queries and I wasn't sure enough it wouldn't break other parts of the CTB code.

Quote:
Originally Posted by Mackx View Post
I pushed a solution based on your previous code to BitBucket a few days ago. But this will make it more easy I guess.
Now after some different tests I've extended the public API of libermetadb with a new function:
Code:
gint64 ermetadb_get_file_id(erMetadb thiz, const gchar* filename, const gchar* dirpath);
As it's executed a few times for each page only, it's fast enough.


Wait a couple of days, I won't be able to work on it this afternoon, but I'm close to finish the code to delete files from ctb. I think that's the last work to be done on the DR code.
Anyway you can look at the last patch I published in this thread. It lacks delete files handling and some minor last-time fixes, but the other parts are finished.
I expect to push the final version to BB tomorrow.

Last edited by Iņigo; 07-02-2011 at 07:31 AM.
Iņigo is offline   Reply With Quote