Largely that’s not going to be possible to automate. It really depends on how you ripped them in the first place. Did you tag them in any way? Are they in an Artist/Album folder hierarchy? Jonni suggests pointing you towards Gnome
EasyTag and that should certainly help semi-automate things, though it sounds like you’re at least going to have to identify the album and then let EasyTag do its thing. A job waiting for retirement?
If you just have an unknown MP3 file then you’re more limited in your options. One tool that we discovered was https://
picard.musicbrainz.org that has acoustic ID built in.