View Single Post
Old 07-02-2011, 07:41 AM   #64
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Iņigo View Post
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.



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.
Deleting from mdbindex is not the most challenging (it is always per file), but deleting a complete folder from the UI is. I had to add an extra query to get the involved files and delete their icons one-by-one.
Mackx is offline   Reply With Quote