I have seen a few people on various other MCE and PVR related forums asking how to use
WebGuide2 with your own
XMLTV files, mainly as
SmartGuide uses WebGuide2 as a data source to update the MCE 2005 Electronic Programme Guide. Well, here is a process I came up with to do just that. We do not get EPG or XMLTV data for South African TV channels. Luckily some really smart developers have provided solutions that take care of it all and the South African XMLTV (ZAXMLTV) files
are available here on this site. OK, here goes:
- If you already have WebGuide2 installed then I would recommend you uninstall it and delete the WebGuide folder in C:\inetpub\wwwroot if it still exits.
- Download your XMLTV file from your provider and save it somewhere.
- Download the latest WebGuide 2 build (b13) from the files section of this site if you don't already have it and install it as per normal.
- Close the WebGuide2 configuration application when it pops up. We need to change some settings that only get applied when you reopen the application.
- Once setup is complete, go to the C:\inetpub\wwwroot\WebGuide2\MCE_Wizard folder and open settings.xml using notepad.
- Add a line to the XML file within the <wizard> </wizard> tags for your own country. It does not matter what you call it, just make sure you choose a command that is not a valid XMLTV grabber list. I added:
<xmltv_grabber label="South Africa" command="tv_grab_sa" />
tv_grab_sa does not exist as one of the XMLTV grabbers but I do this so that whatever happens, the XML download will fail in XMLTV which is what we want. We don't want our XMLTV files to be overwritten.
- Copy your XMLTV file to the C:\inetpub\wwwroot\WebGuide2\guide_data directory. Rename the file you just copied to guide.xml.
- Copy your XMLTV file to the C:\inetpub\wwwroot\WebGuide2\guide_data directory. Rename the file you just copied to schema.xml.
- Open the WebGuide2 configuration application by clicking Start > All Programs > MCE WebGuide > MCE WebGuide 2 Configuration or running C:\inetpub\wwwroot\WebGuide2\MCE_Wizard\MCE_Wizard.exe.
- Click the Grabber tab.
- Under Step 1 choose the country you have added in the settings.xml file. Don't bother about clicking Configure, it is not required.
- Under Step 2 click the Download Data button. A command window will open and close. This is the download of the XMLTV files failing because we have chosen an invalid XMLTV grabber. The wizard application may appear to freeze up at this point while it is processing your files into the access database. This may take a while depending on the number of channels and data that you have. Your guide.mdb file in the guide_data folder will have grown in size. Once this process has finished, the wizard application will become responsive again.
- You can now go to the Channels tab to see if it worked. Edit your channels if you want.
- Setup any other settings you may need and close the application.
You should now see guide data when you open the WebGuide2 web page. If you are using MCE 2005, then WebGuide2 does not work "out of the box". To fix it download the
WebGuide2 MCE 2005 fix in the files section of this site. Delete or rename
C:\Inetpub\wwwroot\WebGuide2\bin\WebGuide2.dll and copy the
WebGuide2.dll included in that file you just downloaded to the
C:\Inetpub\wwwroot\WebGuide2\bin folder. Note: if you decide to rename the original dll, do not let it have a .dll file extension anymore. I suggest renaming it to .old or something. If your leave it a .dll the ASP.NET runtime will still see it as a proper .NET assembly and load it, which will give errors because of duplicate types. MCE 2005 has XP Service Pack 2 installed which changes some security settings to increase security for your system. One of these increased settings interacts with the way WebGuide2 works in a way that it prevents a COM component from being activated. To resolve this you need to apply the following changes:
- Open Component Services from Control Panel > Administrative Tools.
- Drill down to My Computer, right click and select Properties.
- On the COM security tab, select Edit Default… for Launch and Activation permissions.
- Give the ASP.NET account (the username is ASPNET) Launch and Local Activation permissions.
Up to now we have focused on the initial download of your XML data into WebGuide2. How do you then update WebGuide2 with new XML files from time to time? Easy? Yes!
- Copy your new XMLTV file to the guide_data directory within the WebGuide2 directory. This is the file you download with fresh data once a day/week/month or whatever. The default path is C:\inetpub\wwwroot\WebGuide2\guide_data.
- Rename your XMLTV file to new_guide.xml.
- Copy it again and rename it to new_schema.xml.
- Run C:\inetpub\wwwroot\WebGuide2\MCE_wizard\MCE_Wizard.exe refresh. This will process your new_guide.xml and new_schema.xml and place the relevant data into the guide.mdb database. Once the process is complete your new_guide.xml and new_schema.xml files will be renamed to guide.xml and schema.xml respectively.
- That's it. You are done and should have updated guide data in WebGuide2.
There is one thing to be mindful of. In my case, I used to have to open the freshly downloaded XMLTV file and do a 'find and replace' on the time data before I copied the file anywhere. WebGuide2 expects the time in GMT format. E.g. +02:00 for my time zone. My XMLTV file had the time in SAST (South African Standard Time) and I noticed that all the dates and times in the WebGuide2 database where the same if the incorrect time zone was used. This has since been resolved and I no longer have to do this but I thought it was worth mentioning. As long as the file you pass to WebGuide2 is a valid XMLTV file, there should be no problems.Also, in South Africa our ZAXMLTV files are generated from our satellite broadcaster. They include all the free to air channels in their service but the channel numbers are quite high in their list. So, to change the XMLTV file so that the channels are numbered as 1,2,3,4 and 5 and not 3, 46, 47, 48 and 49. To do this I use a cool little utility written by Rob Flor to find and replace the relevant data within the XMLTV file. Alter.exe as well as the batch file I use to update MCE can be found within the XMLTV folder in the download package of either
SmartGuide for MCE 2005 or
QuickGuide for MCE 2005 in our file gallery.
If you live outside South Africa and need to do the same, you can just adapt the code below.
I have automated this process somewhat but cannot automate it fully. Once a week I download my XMLTV file manually and put it in my
C:\XMLTV folder. I then run batch file that does the find and replace, copies the xml file to the correct locations and runs the refresh command. It then goes on to update the EPG in MCE 2005 using SmartGuide. Below is the excerpt of the batch file:
rem c:\xmltv\alter.exe c:\xmltv\zaxmltv.xml "SAST" "+02:00"copy "c:\xmltv\zaxmltv.xml" "c:\inetpub\wwwroot\webguide2\guide_data\new_guide.xml"copy "c:\xmltv\zaxmltv.xml" "c:\inetpub\wwwroot\webguide2\guide_data\new_schema.xml"c:\inetpub\wwwroot\webguide2\mce_wizard\mce_wizard.exe refresh
That's it. You are done!
Enjoy!