(2016-03-18, 17:44)zag Wrote: - Maybe a much harder one but Kodi music scanner to skip file scanning for non changed files (Kodi currently seems to read the id3 tags on every single library update)
Detour into scanning - extracting data from the music files themselves, used to create music library songs, albums and artists, opposed to scraping.
Kodi does already skip scanning tags on non-changed files, but of course it has to look to see what files have changed.
When you click library update, or have it happen automatically on start-up, you see Kodi loop through all your music sources and every subfolder. But it does
not read the ID3 tags every time, that would be silly, instead it loops through the file structure looking for changed file path hash made from filenames, filesize and filedate.
If a song file hash has changed (meaning it has been edited and the tags may have changed) it then removes all the song data for songs in the same folder i.e. that album (presuming an album structure) and then rescans their tags and recreates the library entries. Effectively it rescans the album because the album data relies upon the tags of all its songs, so one song change could mean an album change, new artists also get picked up. If you have song files in a flat structure then this will mean a lot of rescanning when one file changes or new one added.
Do we want Kodi to even skip checking certain folders for changed file hash? I guess we could if even just a check of file hash is too slow. Some timmings for library update checking (no changes, no scraping) on large libraries would be interesting. But notice it is only update library that does this full hash check across all sources and subfolders. From file view you can trigger the rescan of a single media source, or scan of a new one. Want to scan just new stuff, add a new source and scan that, don't click library update so often.
Do we as users really want to spit our music into "archived" and newer stuff? Persoanlly I structure by category (family member, classical, soundtracks, pop etc.) then (primary) artist > album or composer > album. New stuff gets added under the category>artist mixed in with the stuff I already have. Only way to locate my new is have Kodi check all the hash.
I guess what could be useful for the more expert user is the ability to check (and re-scan) a subfolder of a music source rather than the whole source. For example I know I have added more Beethoven albums, but I have one music source for all my classical music and I want to avoid checking all of it or adding a separate source for each composer, the ability to check just the subfolder would be efficient. But I could just split my music into more sources if I was that worried about it.
Remember all that ^^ is about scanning, not scraping.