I've had to stop using the music database as it takes a long time to do the inital scan of 40k mp3's, which is fair enough, all those id3 tags to read. However when you later add a few new mp3's, rather than just scanning in the new ones it seems to rescan the whole lot, presumably checking each mp3's ID tags as it takes hours and hours all over again. I guess I could make it rescan at night.
I wondered if it would be practical to store the file's modified time in the database, using that and the files full pathname as a unique key, then you can just add each file found during a fast folder re-scan to the database which will reject any unchanged duplicates. At the end any old updated files can be rejected en masse by deleting any duplicate pathnames (disregarding modified time and using db dirty_flag to select the previous not new entry). Using a dirty_flag again to select newly added records that can have their id3 data scanned in. Dunno if stored procedures are available/used to make this quicker?
(sorry for all the posts, I wanted to get them out of the way and get opinions before I start playing with the code myself (just for fun!) to test the feasability )
I wondered if it would be practical to store the file's modified time in the database, using that and the files full pathname as a unique key, then you can just add each file found during a fast folder re-scan to the database which will reject any unchanged duplicates. At the end any old updated files can be rejected en masse by deleting any duplicate pathnames (disregarding modified time and using db dirty_flag to select the previous not new entry). Using a dirty_flag again to select newly added records that can have their id3 data scanned in. Dunno if stored procedures are available/used to make this quicker?
(sorry for all the posts, I wanted to get them out of the way and get opinions before I start playing with the code myself (just for fun!) to test the feasability )