Hi.
I like to introduce a little tool named Episodes2TVGuide (short E2T) written by @lightshock to enrich any xmltv compatible tvguide.xml with data from http://www.thetvdb.com/ This includes season and episodes numbers for every series that is listed on tvdb. And the user can use the tvdb descriptions instead of the ones delivered by the data grabber (like WebGrab++ or mc2xml or similar).
There are similar tools out there but they all are manipulating the database of the TV engine after the data was imported. So for every engine, every type of database there is a need for a special program. E2T is different as it enriched the tvguide.xml before it is imported into the TV server database. For this it is independent of the used TV engine and is working with MP1, MP2/TVE3.0, MP2/TVE3.5, ArgusTV, TVHeadend,...
E2T is searching the whole tvguide.xml for series that can be matched on TVDB. If there is a match it download the metadata for this series from tvdb and stores it locally on disk. If you are using MP2 the MP2 cache can be used too, as MP2 is caching exactly the same data used in E2T. This will limit the data- download as much as possible. After first run there is a file called "Episodes2TVGuide.ID.xml" created in the working directory. This contains all previous matches and can be edited to help matching more series. A sample entry is looking like this:
ID contains the TVDB- ID, NameTvGuide is the series name used in the EPG data and NameTvdb is the name used on TVDB for this series. Added is for cleaning purposes. If a series is not scanned for a longer time this entry will be removed to limit the file size...
If a series is not matched automatically it is listed this way:
If you add the ID and NameTvdb manually then E2T is finding the series properly on next run.
E2T is a command- line tool that takes two options --input and --output. --input sets the path to the tvguide.xml delivered from you preferred grabber tool and --output set the path of the resulting tvguide.xml, that should be imported into the TV server database by XMLTV- Plugin...
As example I'm calling E2T in the same batch that runs WebGrab++ with this parameters:
and I'm pointing the XMLTV plugin to look for new data in C:\WebGrab\.
The complete batch that is run daily from Windows Task Planer is like this:
It first runs WebGrab++ and, after the data grabbing is finished E2T is working on the guide.xml and saves the final tvguide.xml in a different folder. So for this XMLTV plugin only notice the final data and did not start importing unfinished xml files... Don't forget to "cd" into the folder where the E2T exe is laying. Without this it is not working properly. And you also need to copy the xmltv.dtd file into your folder(s)...
Aside the command line switches there is a settings file "Episodes2TVGuide.xml" Here the user can change the options of E2T... This file will be created on first run of E2T, so you once need to start E2T before you can configure it.
The most important option is "TVDB_Language", the language to search the TVDB. As the author is German here "de" is set as default. You need to change it to "en", "fr" "es, "it" "ru" or whatever language you prefer...
Then there is a block of tags defining separate chars that are used in your EPG data to separate Series from Episodes titles. Normally this is something like "-" or ":" or similar... What exactly you need to add here depends on your data source...
Other blocks are for ignoring fields as they are not used inside MP EPG at all, replacing or ignoring strings in the data and the path to your MP2 server installation (if you are using MP2 you can save download time and bandwidth by re-using the MP2 data cache but of course E2T is working flawlessly without MP2). And there are two "TVDB_Overwrite" tags. One for the plot and one for series/episodes name. If one or both of them are set to "true" the series name/episodes name or description in the EPG data is replaced by the corresponding data from TVDB. This only affects filled fields in the raw EPG data. Empty fields are always filled with data from TVDB. So if your EPG data did not have any episodes description this will be added from TVDB, no matter what you have configured here. You can "force overwrite" those fields by using this options...
By the way, E2T needs .NET4.5 (so it can not run on Windows XP or earlier) but can be used on Linux and Mac with Mono (without any re-compiling)... If you run a Linux Server you're be able to run WebGrab and E2T on it and simply download the finished tvguide.xml from your server into XMLTV plugin...
The recent version is 0.16.73 and it is attached here.
Most likely newer versions are first to find in the German forum before they are added here:
https://forum.team-mediaportal.com/threads/episodes2tvguide-e2t-anpassen-der-tvguide-xml.133534/
Maybe we can add this tool to the repository later...
I like to introduce a little tool named Episodes2TVGuide (short E2T) written by @lightshock to enrich any xmltv compatible tvguide.xml with data from http://www.thetvdb.com/ This includes season and episodes numbers for every series that is listed on tvdb. And the user can use the tvdb descriptions instead of the ones delivered by the data grabber (like WebGrab++ or mc2xml or similar).
There are similar tools out there but they all are manipulating the database of the TV engine after the data was imported. So for every engine, every type of database there is a need for a special program. E2T is different as it enriched the tvguide.xml before it is imported into the TV server database. For this it is independent of the used TV engine and is working with MP1, MP2/TVE3.0, MP2/TVE3.5, ArgusTV, TVHeadend,...
E2T is searching the whole tvguide.xml for series that can be matched on TVDB. If there is a match it download the metadata for this series from tvdb and stores it locally on disk. If you are using MP2 the MP2 cache can be used too, as MP2 is caching exactly the same data used in E2T. This will limit the data- download as much as possible. After first run there is a file called "Episodes2TVGuide.ID.xml" created in the working directory. This contains all previous matches and can be edited to help matching more series. A sample entry is looking like this:
XML:
<CCacheSerie>
<Id>79167</Id>
<NameTvGuide>Bob Ross - The Joy of Painting</NameTvGuide>
<NameTvdb>The Joy of Painting</NameTvdb>
<Added>2016-01-20T15:42:11.7293957+01:00</Added>
</CCacheSerie>
If a series is not matched automatically it is listed this way:
XML:
<CCacheSerie>
<Id>0</Id>
<NameTvGuide>I, Robot</NameTvGuide>
<NameTvdb />
<Added>2016-02-29T10:02:08.9850486+01:00</Added>
</CCacheSerie>
E2T is a command- line tool that takes two options --input and --output. --input sets the path to the tvguide.xml delivered from you preferred grabber tool and --output set the path of the resulting tvguide.xml, that should be imported into the TV server database by XMLTV- Plugin...
As example I'm calling E2T in the same batch that runs WebGrab++ with this parameters:
Code:
cd "C:\WebGrab"
"C:\WebGrab\Episodes2TVGuide.exe" --input:"C:\ProgramData\ServerCare\WebGrab\guide.xml" --output:"C:\WebGrab\tvguide.xml"
The complete batch that is run daily from Windows Task Planer is like this:
Code:
c:
cd "C:\ProgramData\ServerCare\WebGrab"
"C:\Program Files (x86)\ServerCare\WebGrab+PlusV1.1.1\WebGrab+Plus.exe"
cd "C:\WebGrab"
"C:\WebGrab\Episodes2TVGuide.exe" --input:"C:\ProgramData\ServerCare\WebGrab\guide.xml" --output:"C:\WebGrab\tvguide.xml"
Aside the command line switches there is a settings file "Episodes2TVGuide.xml" Here the user can change the options of E2T... This file will be created on first run of E2T, so you once need to start E2T before you can configure it.
The most important option is "TVDB_Language", the language to search the TVDB. As the author is German here "de" is set as default. You need to change it to "en", "fr" "es, "it" "ru" or whatever language you prefer...
Then there is a block of tags defining separate chars that are used in your EPG data to separate Series from Episodes titles. Normally this is something like "-" or ":" or similar... What exactly you need to add here depends on your data source...
Other blocks are for ignoring fields as they are not used inside MP EPG at all, replacing or ignoring strings in the data and the path to your MP2 server installation (if you are using MP2 you can save download time and bandwidth by re-using the MP2 data cache but of course E2T is working flawlessly without MP2). And there are two "TVDB_Overwrite" tags. One for the plot and one for series/episodes name. If one or both of them are set to "true" the series name/episodes name or description in the EPG data is replaced by the corresponding data from TVDB. This only affects filled fields in the raw EPG data. Empty fields are always filled with data from TVDB. So if your EPG data did not have any episodes description this will be added from TVDB, no matter what you have configured here. You can "force overwrite" those fields by using this options...
By the way, E2T needs .NET4.5 (so it can not run on Windows XP or earlier) but can be used on Linux and Mac with Mono (without any re-compiling)... If you run a Linux Server you're be able to run WebGrab and E2T on it and simply download the finished tvguide.xml from your server into XMLTV plugin...
The recent version is 0.16.73 and it is attached here.
Most likely newer versions are first to find in the German forum before they are added here:
https://forum.team-mediaportal.com/threads/episodes2tvguide-e2t-anpassen-der-tvguide-xml.133534/
Maybe we can add this tool to the repository later...
Attachments
Last edited: