Most likely as all those tools with an online lookup while importing the files. And stored are the ID as always inside the database of the HTPC program (WMC or now MP2)... Maybe the content of the XML files is different on your system but here there definitely is no ID number stored in those XML files. And no, there is nothing wrong in adding season and episodes numbers to the file, nothing at all...Where does WMC acquire the ID numbers from and where are they then stored?
Oh yes, this is very true and most often in most sources. That's why I never use genre myself...Also the genre identification is occasionally bizarre!
Sadly most EPG sources are using non specific numbering schemes here. There are extra data fields for season and episodes number even inside the xml file. And my other tool, EPG-Buddy is filling those numbers as good as possible also non of the supported EPG data sources are delivering them in a clean way... So I have those numbers for most series episodes I ever record...obtains this information and appends it to the program description
Here is such a xml file generated by MP2 on my system:
EPISODENUM and SERIESNUM are filled properly here (it's S02E19 from "I dream of Jeannie") but the TVDB- ID (77388 in this case) is nowhere written inside the xml or inside the EPG data... But it is inside the .nfo files generated by Media-Buddy so every program (excerpt of MP1 due to missing support for .nfo) exactly knows which series it is. "I dream of Jeannie" maybe is no big deal to identify, but think about "Doctor Who" or, even worse, "The Flash" or "Buck Rodgers"...<?xml version="1.0" encoding="UTF-8"?>
<tags>
<tag>
<SimpleTag>
<name>TITLE</name>
<value>Bezaubernde Jeannie</value>
</SimpleTag>
<SimpleTag>
<name>COMMENT</name>
<value>Endlich darf Jeannie auch einmal selbst Auto fahren. Sicherheitshalber tut sie das erst einmal in unsichtbarem Zustand – und Dr. Bellows (Hayden Rorke) sieht fassungslos ein fahrerloses Fahrzeug im Straßenverkehr. Kurz darauf wird Jeannie – jetzt wieder sichtbar – von einem Polizisten angehalten. Da sie keinen gültigen Führerschein vorweisen kann, wird der Wagen abgeschleppt, aber damit geht es eigentlich erst los: Dr. Bellows sorgt dafür, dass der "fahrerlose Testwagen" wieder freigegeben wird – und kurz darauf wird Jeannie von dem gleichen Polizisten ein zweites Mal angehalten...</value>
</SimpleTag>
<SimpleTag>
<name>GENRE</name>
<value>Comedyserie</value>
</SimpleTag>
<SimpleTag>
<name>CHANNEL_NAME</name>
<value>ONE HD</value>
</SimpleTag>
<SimpleTag>
<name>EPISODENAME</name>
<value>Liebe geht durch den Wagen</value>
</SimpleTag>
<SimpleTag>
<name>SERIESNUM</name>
<value>2</value>
</SimpleTag>
<SimpleTag>
<name>EPISODENUM</name>
<value>19</value>
</SimpleTag>
<SimpleTag>
<name>EPISODEPART</name>
<value>
</value>
</SimpleTag>
<SimpleTag>
<name>STARTTIME</name>
<value>2020-02-06 16:20</value>
</SimpleTag>
<SimpleTag>
<name>ENDTIME</name>
<value>2020-02-06 16:55</value>
</SimpleTag>
</tag>
</tags>
The matching .nfo file for S02E19 of "I dream of Jeannie" looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--created on 2018-08-11 22:54:01 - nfo4MPv3 v0.110.111 (22.04.2018)-->
<episodedetails>
<id>77388</id>
<title>Liebe geht durch den Wagen</title>
<showtitle>Bezaubernde Jeannie</showtitle>
<plot>Ein lang gehegter Wunsch von Jeannie geht in Erfüllung: Sie darf endlich selbst am Steuer eines Wagens sitzen. Damit nichts schief gehen kann, macht sie sich aber erst einmal unsichtbar – zum Entsetzen von Dr. Bellows, der ein fahrerloses Auto durch die Straßen des Ortes flitzen sieht. Kurz darauf wird Jeannie, die sich mittlerweile wieder sehen lässt – im wahrsten Sinne des Wortes – von einem Polizisten angehalten. Natürlich kann sie keinen Führerschein vorweisen...</plot>
<season>2</season>
<episode>19</episode>
<dvd_season>2</dvd_season>
<dvd_episode>19.0</dvd_episode>
<thumb>http://thetvdb.com/banners/episodes/77388/239985.jpg</thumb>
<year>1965</year>
<rating>7,8</rating>
<votes>15</votes>
<tvdbid>77388</tvdbid>
<imdbid>tt0058815</imdbid>
<runtime>24</runtime>
<language>|</language>
<status>Ended</status>
<genre>Comedy</genre>
<genre>Fantasy</genre>
<studio>NBC</studio>
<actor>
<name>Barbara Eden</name>
<role>Jeannie</role>
<thumb>http://thetvdb.com/banners/actors/55154.jpg</thumb>
</actor>
<actor>
<name>Larry Hagman</name>
<role>Major Anthony Nelson</role>
<thumb>http://thetvdb.com/banners/actors/55153.jpg</thumb>
</actor>
<actor>
<name>Bill Daily</name>
<role>Major Roger Healey</role>
<thumb>http://thetvdb.com/banners/actors/55157.jpg</thumb>
</actor>
<actor>
<name>Emmaline Henry</name>
<role>Amanda Bellows</role>
<thumb>http://thetvdb.com/banners/actors/55158.jpg</thumb>
</actor>
<actor>
<name>Barton MacLane</name>
<role>General Peterson</role>
<thumb>http://thetvdb.com/banners/actors/55156.jpg</thumb>
</actor>
<actor>
<name>Vinton Hayworth</name>
<role>Gen. Winfield Schaeffer</role>
<thumb>http://thetvdb.com/banners/actors/55155.jpg</thumb>
</actor>
<actor>
<name>Hayden Rorke</name>
<role>Dr. Alfred Bellows</role>
<thumb>http://thetvdb.com/banners/actors/55152.jpg</thumb>
</actor>
</episodedetails>
As you easily can see, there is much more information stored. Various external ID (TVDB, IMDB) production -year and -studio (not the channel where you have recorded the file that is not relevant) information about cast and crew, status ("ended" for sure as it is a very old series), genre,...
If such a nfo file exists, MP or Kodi or Plex or Emby or,... don't look online for information about the file to be imported. Instead the data from the .nfo file is used. So no matter if you have a fast internet connection or no internet at all, this movie/episode is imported in no time and exactly the way it is written in the .nfo. As you have control about what's written in the .nfo everything is exactly as you want it to be without any further work and independent from the used program...