(2013-03-15 03:06)jmarshall Wrote: 1. Don't bother looking in MyVideos75.db. There's no need to do so. If you MUST look in there, then just use JSON-RPC to grab what you need - that way you're immune to db layout changes.
From MyVideos75.db (MyMusic32) i get the the info from the art table, the script generates the hash and then excludes the images from the list of files to be deleted. Yes, I can convert the query to JSON, so I'll study to do this. (It's possible to get the content of the art table with JSON? I couldn't even get the version number in my previous attempt.)
(2013-03-15 03:06)jmarshall Wrote: 2. Do bother looking in Textures13.db. It's a local sqlite database only. The layout can and will change, but you can't do anything about that for now, so don't bother *All you need do is compare what's there with what's on disk.*
Yes, in fact I do this, exactly as MyVideos and MyMusic.
(2013-03-15 03:06)jmarshall Wrote: 3. Further, you can then start doing cleanup based on the time and usage information stored in that database. e.g. you could clean up stuff that hasn't been used for ages. Note that this gets around having to play in the videodb or musicdb's - stale entries in Textures13.db gets cleaned out automatically with time.
In the settings I added a slider to set the days. I compare the days with the lasthashcheck field, then deletes the old. I added an option to delete the fields that have an empty lasthashcheck (I noticed that normally have an http:// url)
(2013-03-15 03:06)jmarshall Wrote: 4. Note that XBMC operates under the assumption that Textures.db is king - i.e. it doesn't matter if it's on disk, if it's not in the database it'll be recached. Thus, to recache stuff, just remove the entry in Textures.db (assuming ofc that the original URL is still valid). Further, this implies that anything on disk and not in Textures.db can be removed, and anything not on disk but in Textures.db is a stale entry in Textures.db so should be removed.
Yes, I know this.
(2013-03-15 03:06)jmarshall Wrote: Lastly, once you've come up with a good system, we'll look to expose whatever you need via JSON-RPC so you're then immune to db-layout issues and no longer need a database connection. I suspect all you really need is a way to grab everything from the texture (joined size) tables?
I'll work to do this!
In conclusion. I read all files present in the Thumbnails folder. I get arts info from the MyVideos db, calculates hash and excludes the files. Same thing with the MyMusic db. Process the textures table, deletes all fields with empty lasthashcheck (option), deletes all fields that are older than X days (optional), then compares the fileds that are remained with my list of files excluding the files that are present, and lastly copy/move the remained files, that can be safely to deleted. I think this is the correct way, but I could be wrong.
UPDATE: OK, I get the arts with JSON, except for the actors.
1. How to I get the actors thumbs?
2. The season-all-poster is missing when query GetSeasons.
2. Can I call the textures13.db with JSON?