@
buddiemac Karellen and I work together (allowing for a big time zone difference) so you can talk to us in together.
"Scan Item To Library" should not be appearing on the context menu for any items on the music playlists node, and is something I will fix. It just happens you are the first person to report what happens when you click on it, well done!
Since you are happy meddling in your db then deletion of records from album table as you have done will clear up most of what was added (ondelete triggers fire to remove related records in other tables). However that path table will still hold entries. The cleaning that you then did within Kodi from system > settings > media > library should have sorted that out, but it could be worth looking at the path table.
So I think what you did was succesfull, and no need to follow the steps Karellen gave you, although generally I would not advocate users mess with their data unless they have some idea what they are doing.
You then ask about song playback history, and I will answer just for your knowledge.
(2020-11-22, 05:59)buddiemac Wrote: When performing your suggested method, will the song ratings be preserved that I have added within Kodi? Are the song ratings (not the rating within ID tag meta data) which are added with Kodi added into the database? The song playback history, is this data separate from the database or is part of the database? Can you please elaborate on what is the source of "song play back history"?
From v18 it is possible to export the "song playback history", that is the transient song data - user rating (added via Kodi UI), last played date, play count - that is not stored in the music files themselves and would otherwise be lost when a music source is removed from the library and related records deleted from the database. It is also a way to transfer that transient data from one Kodi installation to another where for one reason or another you have not been able to copy the database itself.
Unlike video, exporting the music library is about making a copy of the additional artist and album data that was fetched by scrapers or edited by addons, and the transient song data. It is not a backup, just copy the MyMusicXX.db file for that. But having the export means that you can then recreate your library, by scanning the music files, and then apply the additional data without remote scraping and restore the song playback history.