Not to hijack your thread, but I have a similar problem that I have been trying to fix for a few days now. I figure I would share everything I have tried so far and maybe bounce a few new ideas around.
My situation is like this. I have a Motorola Moto G4 running Nougat 7.0. One night, I happened to be looking for a particular song by a particular artist, but the whole album was missing from their listing.
It turns out it was categorized under unknown artist. Not only that, but there were about 20 other albums there as well. Upon closer inspection, there wasn't any data associated with the files. For some reason, the media player wasn't reading the ID3 tags. It was pulling the folder name and the file name, but that was it.
First thing I tried was wiping the cache of the different music players I have been using. I have been trying out a few to see what I like. They are Google Play Music, Shuttle, Pulsar, and Phonograph. No luck there.
After a quick Google search, it seems like this is a common problem with no straight forward answer. Thr next suggestion I found was to wipe the Media Storage data and cache, so I tried that and after waiting for the library to rebuild, the files were still unknown. There were actually even more random files there now.
So since all of my music is on a 64GB Sandisk SD card, I decide to check if it is corrupted. I plug it into my PC and run chkdsk on it and it is fine. Looking at the MP3 on the computer, I can see all of the tag info there. I use Tagscanner to tag all of my music, add cover art, and sometimes lyrics and stuff.
So next I decide to check my backup MP3s on my PC for corruption using MP3diag. Some of the files come up with errors like truncated data stream or null frames and things, but a majority come back fine. I used MP3diag to repair any problem files and decided to use one album to see if the phone could read it.
So after another cache wipe, I copy the files to the SDcard, insert it into the phone, and power it backup. I waited for the media library to rebuild, and when I checked back later, still no luck.
Next thing I try is moving the folder yo internal storage. Cache wipe, reboot, library rebuilds. Still nothing.
Now I'm getting desperate. I tried renaming the folders. Nothing. Renaming the files. Nope. So now I download and app called ID3fixer. It claims to fix the tags of the MP3s. When I run it on these files, I noticed something strange. It can actually read the ID3 data off of my files. I know it's my tags because I had lyrics on the songs and it showed them.
So the app gives 2 options for repair. The recommended option is to repair the file directly, so that is what I try first. Repair, wipe cache, reboot, rebuild, and nothing. Damn. So I try the second option which is to repair the Android database and what do you know, that works... sort of. The tags for artist and album show up, so it is in the right spot in the media player now, but it is still missing some data like track duration, which comes up 0:00, and track number.
Next, I put the SDcard back in my PC. I make new copies of my PC backups, and remove the ID3 tags completely from the files using MP3tag. Put them back on the SDcard and that back in the phone. Now it can read the files and track duration, but since there is no ID3 data, it pulls the album info from the folder name and track name from the file name.
So I take the SDcard, put it back in the PC and tag these new files using MP3tag to auto fill the info from the web, but when I put the card back in the phone, they still come up unknown and the track duration is missing again.
Now there is something curious. The Phonograph app is the only media player I have out of the group that allows tag editing. When I use it to edit these problem files, it can read the current ID3 info that's already on the file. Another thing is if I use the same app to pull up the song info for a file, it shows all of the right info, even track duration, even though it show 0:00 <unknown artist> while it's playing.
Again, before anyone asks, I unmount the SDcard when removing it from the phone and PC. I have done multiple wipes of the Media Storage data/cache, as well as wiping the app data and cache.
I have tried to wipe the cache and many other things with no results. My conclusion is that there's something about the files that Android is storing that doesn't get wiped, or possibly I'm not wiping everything that matters. I did find a system app called External Storage, but I'm hesitant to wipe it because I couldn't find any info on what it does. I still won't rule out the files being corrupted, but I don't think that's it.