How to quickly stitch a ton of albums back together into compilations? I trusted Google Music Manager to download my music collection onto a new computer, importing the lot into iTunes. Only after I wiped my old computer did I realize that my music was now screwed up: Most any album featuring multiple artists was now split up into many albums. So Mr. Robot OST is about twenty different "albums", and it's become a pain to try to play a whole album in iTunes. How can I fix my songs?

I read some blurbs online about manually fixing an album, by checking the compilation box for each individual song. But I have a fair amount of songs to fix, so that would take a long time to do by hand! Can someone recommend an iTunes plugin or AppleScript or bash file to fix my music?

Assuming it's safe to enable the part-of-a-compilation bit on every song, even those that aren't actually part of a compilation, then I wonder if I could just loop over each .mp3 file and run some CLI app to fix the bits?
I've had to fix some music before manually to get them sorted into full albums. You CAN select multiple files at once and change them in one click; if I recall correctly iTunes may prompt you to confirm that you really want to mass-edit files it thinks should not be treated as a single album.

Be careful you don't overwrite anything except the field you intend to change, as you can easily accidentally rename or assign the same artist for all of them at once. To be safe, it might be best to group-select items from the same compilation only.