See the Media Preparation Guidelines for info on naming & structure of movies, TV shows, etc.
You must keep movies & TV shows in separate libraries. Matching online databases and downloading metadata will fail if you do not.
Not mentioned in the guidelines is that Plex ignores text between square brackets. If you want to have resolution, audio format, or whatever in the file name put it between square brackets.
For example:
/Movies
/Avatar (2009)
Avatar (2009) [720p, DDP51].mkv <-- This is OK.
Avatar.2009.720p.DDP51.mkv <-- This is not.
Plex can be very picky with TV shows. Definitely use the recommended layout. It might work otherwise, but you’re just getting lucky.
Also, Plex matches TV shows against thetvdb.com. Organize your seasons and episodes the same way for best results. For example, the BBC show “Spooks” aired in the US as “MI5.” TVdb.com has it as Spooks, so it should be named Spooks in Plex. Trying to name it MI5 may lead to weeping & gnashing of teeth.
Example TV show folder & episode structure from Media Prep guidelines. The episode name is optional:
/TV Shows
/Grey's Anatomy
/Season 01
Grey's Anatomy - s01e01.avi
Grey's Anatomy - s01e02 - The First Cut is the Deepest.avi
Grey's Anatomy - s01e03.mp4
/Season 02
Grey's Anatomy - s02e01.avi
Grey's Anatomy - s02e02.mkv
Grey's Anatomy - s02e03.m4v
Finally, after you rename/reorganize files and rescan the library, Plex may still not pick up the new name. This is usually because it is using the previously cached data. If this happens, you’ll need perform the Plex Dance with the media. It is a bit of a PITA, but it will clear out the old, incorrect metadata then re-download using the new file names / structure.