You won't need below if you name the folders as per Kodi's naming scheme i.e Movie name (year).
Example for TV Series with example structure:
antisa@antisa-desktop:/mnt/nas/Serije$ tree -d Earth\ Final\ Conflict\ -\ Season\ 1-5\ \(All\ seasons\)/ Earth Final Conflict - Season 1-5 (All seasons)/ ├── Earth Final Conflict - Season 1 ├── Earth Final Conflict - Season 2 ├── Earth Final Conflict - Season 3 ├── Earth Final Conflict - Season 4 ├── Earth Final Conflict - Season 5 └── Earth Final Conflict Soundtrack └── tvshow.nfo
Put the nfo file named tvshow.nfo under the main folder as show above. File contains:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tvshow>
<title>Earth: Final Conflict</title>
<plot></plot>
<userrating></userrating>
<mpaa></mpaa>
<uniqueid type="tmdb" default="true">2840</uniqueid> <!-- add a value to type="" eg imdb, tmdb, home, sport, docu, see sample below -->
<genre></genre>
<premiered>1997-10-06</premiered> <!-- yyyy-mm-dd -->
<year>1997</year>
<episodeguide>2840</episodeguide>
<status></status>
<studio></studio>
</tvshow>
Now update the library and it should show up.