I don't think you can add that information to the page you are using - you'd have to switch to using the XML API instead.
I'm not totally sure on how the xml api works for thetvdb. As a test, I've just registered myself for an API key and done some manual tests using Bleach and information from here:
http://thetvdb.com/wiki/index.php/Programmers_API .
As I understand it, here are the steps:
1 - Pull mirror info. Right now there is only one mirror, so I didn't worry about mirror selection.
2 - Lookup the series using
http://www.thetvdb.com/api/GetSeries.php?seriesname=Bleach - this tells me that the series id is 74796
3 - Get series information using this link - <mirrorpath_zip>/api/<apikey>/series/<seriesid>/all/en.xml - which would be something like this:
http://thetvdb.com//api/XXXX/series/74796/all/en.xmlThe xml file that you get back is explained in the wiki, but on a high level goes:
Code:
<data>
<series>
series info
</series>
<episode>
episode info
</episode>
<episode>
episode info
</episode>
....
</data>
4 - Parse the xml and find the episode and info you need.
Each episode tag has the base episode record info outlined at this link -
http://thetvdb.com/wiki/index.php/API:Base_Episode_Record - including season, episode, title, and absolute episode.
Here's an example, again for Bleach:
Code:
<Episode>
<id>336770</id>
<Combined_episodenumber>13</Combined_episodenumber>
<Combined_season>7</Combined_season>
<DVD_chapter/>
<DVD_discid/>
<DVD_episodenumber/>
<DVD_season/>
<Director/>
<EpImgFlag/>
<EpisodeName>Ishida Chad, the Quickening of a New Power</EpisodeName>
<EpisodeNumber>13</EpisodeNumber>
<FirstAired>2007-10-17</FirstAired>
<GuestStars/>
<IMDB_ID/>
<Language>en</Language>
<Overview>
Ichigo. Uryuu and Chad arrive in Hueco Mundo to find themselves in strange building. They are able to survive and avoid most of the traps but they must then find a way out of the building and deal with the guards who are there to get rid of any trespassers who dare to enter. Finally, Chad and Uryuu’s new powers will be tested in a real situation.
</Overview>
<ProductionCode/>
<Rating/>
<SeasonNumber>7</SeasonNumber>
<Writer/>
<absolute_number>144</absolute_number>
<filename>episodes/74796/336770.jpg</filename>
<lastupdated>1266331910</lastupdated>
<seasonid>28677</seasonid>
<seriesid>74796</seriesid>
</Episode>
So from this, you'd have to scan each episode tag to find the one with the correct absolute number, then read the season, episode, title, and build the new file name from that.
I imagine this may be a little more complicated than how you are doing it now, but it would also open the door for even more features with all the data available in the xml.
B