Like others said the arr stack is probably what you're looking for. If you're only looking to rename files sonarr will fill you in ! Look at the documentation, I only use sonarr to rename my local files !
Other thing to consider, is this cool github project TVMV which also renames the files but you need to register to create an API key from TMDB (its free and you can fill in dummy informations). But it's less customizable. I'm only using it to rename files if their name is in a different language than English.
About metadata, I don't know if there's a bulk and recursive metadata editor and dunno if sonarr fills in the gap. However, mkvtool and bash scripting is probably going to be your tools here.
How I would go about it:
- rename your files with sonarr putting all the important stuff in the filename
- bash script with mkvtool to strip and copy portions of the title name and add them in the corresponding metadata field.
There's probably a better way to stripe metadata from sites like tvdb
but I'm not a dev so it's totally out of my scope and knowledge.