The purpose of this guide is to give direction on how to setup and configure the XMLTV Project Grabber to use XMLTVListings.com guide data for the EPG. This guide already assumes that you have knowledge of Windows Command Line Interface (CLI).
This guide is offered “as is”. Any issues or problems with using the guide, or with Windows Operating System are not covered in this guide. As such, no warranty, or support is offered to you regarding your system. Use at own risk.
Testing Parameters and Versions
- Tests completed using Windows 10 Pro 20H2 64bit.
- XMLTV version is 1.0.0-win32.
- All information regarding the Grabber is obtained from here: http://wiki.xmltv.org/index.php/HowtoUseGrabbers
- Log into your XMLTVListings.com account
- Note your API Key located at the top left under the "Account Summary". You will need the API Key later when you configure the grabber.
- Create a Lineup. When finished note the Lineup ID. This will be a 4 digit number.
Installing XMLTV Package
- You will need to install XMLTV on your system. Download the zip file from here: https://sourceforge.net/projects/xmltv/files/xmltv/1.0.0/
- Unzip the download to your computer. For example: C:\XMLTV
- Open the Command Line Interface for Windows and navigate to where you extracted the XMLTV files. For example, your command would be: C:\XMLTV\xmltv.exe
- This will take some time to start on the first run. You will then see this output listings all the grabbers installed on your system:
- Configure the tv_grab_na_tvmedia Grabber using the following command:
xmltv.exe tv_grab_na_tvmedia --configure
- Enter your API key which is found on your account dashboard page.
- Choose one or your lineups. You can add or modify lineups from your account page
- This will create a new folder called .xmltv in the same folder as where you ran the xmltv.exe from. Here is where your configuration is saved (your API key and the lineup ID that you are downloading.
Download Data using the Grabber
- Type the following commands:
Xmltv.exe tv_grab_na_tvmedia --days 7 --output guide.xml
- --days xx is how many days you want to download. Max is 14. Please note: only download the max days that you would use. The more days you download, the longer the time to download the data file.
- --output guide.xml is the name of the file that is stored locally on your system. This file, using the above command, will store in the same folder as where you ran the command from.
- You can now open the guide.xml file using a text editor (like Notepad) and see the guide information.
Automate the Daily Download
- You will want to automate this command so that the grabber downloads the data on a daily basis. Create a file called xmltv_download.bat (name it what you like) and save it to the C:\XMLTV directory with the following contents:
rem Download XMLTV data from XMLTVListings.com using Grabber
C:\XMLTV\Xmltv.exe tv_grab_na_tvmedia --days 7 --output guide.xml
- Please note: the location of the command is dependent on where you run xmltv.exe from.
- Create a Scheduled Task using Windows Task Scheduler for the xmltv_downoad.bat file. One download per day is sufficient to get 7 days of data, everyday.
- The scope of this article does not include how to create the scheduled task. If you are not familiar with how this works, simply search the internet for guides on how to do this.