Hi,
Just want to give some feedback about what worked for me.
I have a 60 Gb iTunes library which is mainly composed of albums ripped from cd. All albums had correct artwork etc., no duplicate tracks etc etc, I would say it was a very clean library. I was an iTunes match subscriber till September last year but didn't continue the subscription.
I activated iTunes music on my mac and activated iCloud library which resulted in mixed up artwork, wrong songs playing etc.
I have an old iPhone so I haven't activated iTunes music and iCloud music library on iOS before activating it in iTunes on my mac.
The iTunes 12.2.1 update didn't fix anything for me.
I put back the previous .itl file but this also didn't clean up everything.
After this I followed the apple support doc :
If your music library shows incorrect details with iTunes Match or Apple Music, and you previously cancelled an iTunes M…
even after doing this some tracks weren't right, so I restored both the .itl file and my complete iTunes music library from time machine to a point before the first time I activated iTunes music to be sure everything was like it used to be. All was good again 🙂 and I wasn't planning to turn iCloud music library back on again.
Out of curiosity I decided to create a new empty iTunes library (click option when opening iTunes and choose create library, and put it somewhere different from your other library. When iTunes opened and ask me to activate iCloud music library I chose "yes". I was signed in with my usual apple account so my newly created empty library started to populate itself with all my music that was synced with iCloud, probably a result of being a former iTunes match subscriber (although I reset the iCloud music library as described in the support doc mentioned above). Then I selected all the tracks in my new iTunes library and deleted them. I don't remember what the pop up window said, but it was probably something like "do you want to delete these files from iCloud" so I did. My new iTunes library was completely empty again. I quit iTunes and "option"-opened my regular iTunes library and reactivated iCloud music library and let it do it's work (i thought if something goes wrong again I ll just restore again from time machine and never activate iCloud music library again) I wasn't home so I have no idea how much it took to sync my library with iCloud
But now everything seems okay, all artwork is correct, all tracks are playing correctly, I can add music from iTunes music to my library,...
I guess the combination of resetting the iCloud music library (support doc) + deleting all the iCloud tracks from a new iTunes library did the trick for me.