US EPG using zap2xml with 2 sources (1 Viewer)

kmitch

New Member
January 28, 2018
1
0
Home Country
United States of America United States of America
I wanted to share my setup and configuration for grabbing guide data using zap2xml (zap2xml). My setup includes over the air in the US, and a DirecTV STB. Since I needed two sets of guide data, I created 2 separate accounts on zap2it (TV Listings- Find Local TV Listings and Watch Full Episodes - Zap2it.com).

I've created the following directories (with included files):
C:\TVGuide
TVGuideCombine.exe
Create.bat
Code:
   Contents:
   cd\TVGuide\Antenna
   C:\TVGuide\zap2xml -C C:\TVGuide\Antenna\Antenna.txt
   cd\TVGuide\Satellite
   C:\TVGuide\zap2xml -C C:\TVGuide\Satellite\Satellite.txt
   cd\TVGuide
   C:\TVGuide\TVGuideCombine.exe c:\TVGuide\tvguide.xml c:\TVGuide\Antenna\tvguide.xml c:\TVGuide\Satellite\tvguide.xml
   cd\TVGuide
   copy "C:\TVGuide\tvguide.xml" "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml"
zap2xml.exe
zap2xml.htm
zap2xml.pl
zap2xmlrc.txt

C:\TVGuide\Antenna
Antenna.txt
Code:
   Contents:
   days=13
   user=[email1@server.com]
   pass=[password1]
   outfile=C:\TVGuide\Antenna\tvguide.xml
   cache=C:\TVGuide\Antenna\cache

C:\TVGuide\Satellite
Satellite.txt
Code:
   Contents:
   days=13
   user=[email2@server.com]
   pass=[password2]
   outfile=C:\TVGuide\Satellite\tvguide.xml
   cache=C:\TVGuide\Satellite\cache


When you run Create.bat, here's what will happen:
  • zap2xml will run and grab my OTA channels and programs
  • the cache directory will be created under the Antenna directory
  • a tvguide.xml file will be created in the Antenna directory
  • zap2xml will run and grab my DirecTV channels and programs
  • the cache directory will be created under the Satellite directory
  • a tvguide.xml file will be created in the Satellite directory
  • the guides are combined into 1 tvguide.xml in the main directory
  • the new guide file is copied to the XmlTv plugin folder for processing into MediaPortal

TVGuideCombine is a simple C# program I wrote to pull the channel and programme data from 2 files and combine them. I also noticed that MediaPortal wasn't picking up the Season/Episode information from the tvguide.xml, based on the way it was presented in the file. MediaPortal expects the episode-num node with a system="xmltv_ns" as the first episode_num node, in the files using zap2xml, it was the last such node. The program also moves this node up in the programme node so it is the first episode-num node. I've attached a zip file with the binary and the source for this program.
 

Attachments

  • TVGuideCombine.zip
    9.1 KB

Users who are viewing this thread

Top Bottom