Quote:
Originally Posted by Mackx
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
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.