Okay... That didn't go well.
I created a video file and named it "The Flash (2014) - S05E10.avi", then imported it. MC totally got it wrong, selecting a "Looney Tunes 3D short directed by Matthew O'Callaghan starring Wile E. Coyote and Road Runner."
But anyway, I see the problem now.
MC requires a value in the [Name] field, for all records, as lots of functionality revolves around that field. When importing any video file it will look at the data available, and if it can only find one descriptive element, it puts that in the [Name] field. Hence, the [Series] field gets left blank. Hence your issues and the failed lookup.
There is only one descriptive element in "The Flash (2014) - S05E10.mkv", the Series tag is empty, so MC puts "The Flash" into the [Name] field, "2014" into the [Year] field, because it doesn't consider that part of the name (lots of discussion about that sort of issue with TheTVDB records), and ignores the Season and Episode data as it doesn't know the Series name.
If you could get Sonarr to add the episode name into the file name, such as;
The Flash (2014) - S05E10 - The Flash & The Furious.mkv
MC would then lookup the item correctly. Although it did still put "2014" into the [Year] field in my test, but that issue is fixed if the [TheTVDB Series ID] tag has a value in it, or if the scraped Series name matches a [Series] name already in MC, and that [Series] already has a [TheTVDB Series ID] value associated with it, because that is a relational value (only one value possible for a Series).
Even a file name such as;
The Flash (2014) - S05E10 - Unkown.mkv
should still work, with the Series set to "The Flash" and the [Name] field initially set to "Unknown". The "Get Movie & Tv Info..." function should then use the [TheTVDB Series ID] value if available, or the [Series] name, plus the [Season] and [Episode] fields to look up the correct Episode name and put it into the [Name] field.
Simple really.