I remember that I got some troubles when I removed a source from the library to get rid off items belonging to this source. So, if nothing helps, you can also restart from scratch with new dbs by purging
/home/osmc/.kodi/userdata/Database/MyVideos###.db
and/or
/home/osmc/.kodi/userdata/Database/MyMusic##.db
with a final reboot.
The disadvantage is you have to redefine the content type of all your added sources (which are still listed in Videos->Files
and Music->Files
). But sometimes this is the fastest way …