There is a lot of work to be done yet, but it works.
I'm including some screenshots and some code (patch against r49 of https://bitbucket.org/inigoserna/dr800
, remember to do "hg udpdate -C dr800+ -r49" after cloning the repository).
Could anyone check for memory leaks please? Lot of time since I used to code in C...
CTB: covers in file system instead of global.db
* some comments about the code
- the basic idea is to keep global.db free of book covers, they will be in the file system SD_card/System/.icons/medium/XX/asdfgdgdfh.png
- the original method store all the pixbufs (images) for current view loaded from the db in the model, here we get from file system on demand
- it should be a bit slower than original method in case of few books in the view, but this method use less memory, the difference is huge with lots of books so then it should be much faster too
- id is not stored in the model, so we can't use id % 256 to distribute the covers over the covers root directory
I'm using the first 2 chars of the md5_hex_digest on the fullpath of the book
- erGtkIconView needs to be patched in order to get the images as needed on runtime instead of retrieving from db (look previous screenshots in this thread)
- it handles "system" icons perfectly except a few (see below) => screenshots: test10, test11
- IT WORKS!!! => screenshot: test13: image showing the billiard ball is the presumed cover loaded from the file system
* this PoC only works with iconview by now, it needs some code for contentview as well => very easy
* "fix" old code which uses model store
- remove pixbuf column and references to it
- don't query db for thumbnails
* remaining special icons not managed by now
- settings apps => screenshots: test12
* we use a cache, a hash table
- i think it stores some entries repeated -> glib's g_str_equal bug?
- clean contents when changedir, change_view
- destroy at end
* write a tool (in vala) to move images from db to fs, remove them from db and do a vacuum
* update other programs to copy new icons to fs instead of db
- cover from uds
* test in the real DR with lots of books and compare