How to properly clean the library?
#1
I'm looking for a way to (semi-) automatically clean the music library of remnants that the official cleaning process is unable to delete. I would like to avoid clearing or resetting the library as well as deep rescraping.

Mostly, remnants are the kind of artists that initially didn't have a MBID and were added through a search process and were wrongly identified at that point. For some of those artists I have later added MBIDs. Anyway, I have just exported artists to the artist information folder and I can see that there are several items created for the same group name but with some strings attached.

For example, I have a music files for a group called "Act" (Claudia Brücken, etc.). Initially, it didn't have an MBID and Kodi associated it with a swedish progressive rock group named "A.C.T." by way of a "guessing" lookup (or maybe I did a manual lookup, don't remember). I then did a manual correction and later added an MBID in the hopes that it would self-correct upon the next tag scan.

Now there are actually two artists with two different MBIDS in the "artist" table which shouldn't happen. IMHO when doing a deep rescan (="Do full tag scan even when music files are unchanged") Kodi should also check against existing table entries in the "artist", "album artist" and "album" tables to match the network/local path of the album against the database to make sure no two entries exist for the same object. (When an object is removed from the "album" table the associated "album artist" entry is removed as well, I think)

I think that kind of sanity check is missing so far and an addition would go a long way toward having a clean library - even if it means taking a bit more time. So maybe a way to achieve this when "Do full tag scan even when music files are unchanged" is selected would be to first remove all objects associated with this album and/or path and then recreate them with the newly found tags.

What do you think?
Reply
#2
Cleaning - the music library clean from system > media > library (note remember ro scroll down to music lib section) really does "properly" clean up the db. Inaccessible sources are removed, and all orphaned entries deleted. If when you export you are seeing arists that you did not expect then I promise they have a relationship with some of your music.

The key thing to remember is that the music libaray hodls more than just song and album artists as artists, it also holds composers, producers, and musicians of various kinds (if you have your music tagged for that of course) in the artist table and will let you set art and NFO files for them.
 
Quote:I can see that there are several items created for the same group name but with some strings attached.
That will happen when you have more than one artist with the same name. Kodi can only have that when both artists have mbid and the mbid differ. When exporting, or when reading local art and nfo it uses the initial characters of the mbid to make the foldr name unique.

With Act and A.C.T I suspect that initially the scraper found and applied mbid for A.C.T  (mbid_A.C.T) and gave that to Act. Then you tagged some music files with mbid_Act, and when they were rescanned another artist called Act but this time with mbid mid_Act was created. Hence two entries both called Act but with different mbid.  If when you clean Act with mbid_A.C.T does not get deleted then it means some music is still allocated to that artist, maybe as some role other than album or song artist. I can help you discover what - although not so easy to see your db with MySQL.

Imagine what happens when you do really have two different artists with the same name (different mbid)  in your collection. Scanning happens sequentially, so quite rightly when the different mdib arrives is creates a new artist.  When you rescan you can't remove all artists associated with this album and/or path and then recreate them with the newly found tags becuse they could be also used by an album you previously rescanned. There is no way to be sure all the music related to an artist is being scanned in one go.

But I do intend to revisit the scanning/library building process (one more time) for v19, and I will keep the mis-identified during scraping issue in mind. I know that undoing a boo-boo (in tagging or scraping) can be a tedious struggle and usually means drop sources, clean, and start again.
Reply
#3
Thanks Dave!
Reply

Logout Mark Read Team Forum Stats Members Help
How to properly clean the library?0