Skip to content

6. Settings.xml

edit4ever edited this page Jan 30, 2018 · 24 revisions

Understanding the settings.xml file - for manual setups

The zap2epg.py script can be run without kodi, but requires a settings.xml file to be installed in the same location that contains the zap2epg.py file. It is recommended (easiest) to install the zap2epg addon on a kodi system, setup your location and options and then copy settings.xml file to the alternate system. However, if you do not have a kodi system or would like to manually setup a settings.xml file, the elements/options of the settings.xml are explained below.

You can download a sample settings.xml file by clicking here

First line

<settings version="2">

This must be at the start of the file.

Last line

</settings>

This must be at the end of the file.

All other lines are between the first and last line and are indented

The setting lines contain the setting id and the value for that setting.

Here is the setting line for the zipcode setting:

<setting id="zipcode">92101</setting>

To change the zipcode - change 92101 to whatever your zipcode is.

If you copy your settings.xml from kodi 17 or earlier, the setting lines will have the following format:

<setting id="zipcode" value="92101" />

To change the zipcode on this format - be sure to just change the 92101. Leave the value= and quotes on each line.

Below is the list of setting ids and their available options.


<setting id="zipcode">92101</setting>

This is the zipcode for your location.


<setting id="lineupcode">lineupId</setting>

<setting id="device">-</setting>

The lineupcode and device are specific to your lineup. If you are using OTA (antenna) leave this as lineupId and -. If you are using cable or satellite, you will need to find the lineupcode and device on the zap2it website using the instructions available here.


<setting id="lineup">Local Over the Air Broadcast</setting>

This can be any name you want to give your lineup - it is only seen in the log system and kodi settings.


<setting id="days">1</setting>

This is the number of days of guide data you want to download. You can set to any integer from 1 to 14.


<setting id="slist">21212,73496,100093,20377,24028,69874,50770,106580</setting>

This is a custom list of the station ids used to limit the amount of data downloaded and processed by zap2peg. If left blank, all stations for the lineup will be included. If you want to limit the stations, you can follow the instructions available here.


<setting id="xdetails">true</setting>

This enables/disables the option to download additional program details. Currently this includes original air date, genre and cast information. Set to true to enable and false to disable.


<setting id="xdesc">true</setting>

This enables/disables the option to append additional information to the program description. The order and type of additional information is determined by the desc## settings further below. Set to true to enable and false to disable.


<setting id="epgenre">3</setting>

This sets the option for how to handle the genre information for the program. Genre information is only available if the xdetails setting is enabled. The options are as follows:

  • 0 No genre information is included
  • 1 Full matching of the available tvheadend genre list - most colors in kodi epg
  • 2 Simple matching of the available tvheadend genre list - less colors
  • 3 Original genres are passed to the xmltv.xml file - can be used with new tvh genre to categories option

<setting id="epicon">1</setting>

This sets the option for the type of program icon/thumbnail url to pass to the xmltv.xml file. Options are as follows:

  • 0 No icon/thumbnail
  • 1 Series icon/thumbnail - requires xdetails setting enabled
  • 2 Episode icon/thumbnail

<setting id="tvhoff">true</setting>

This sets the option to enable/disable the tvheadend options (next 6 settings below) from being used. If you are not using a tvheadend backend, do not enable this option. Set to true to enable and false to disable.


<setting id="usern"></setting>

Your tvheadend username if you have one. Otherwise leave blank.


<setting id="passw"></setting>

Your tvheadend password if you have one. Otherwise leave blank.


<setting id="tvhurl">127.0.0.1</setting>

The ip address of the tvheadend backend server. If located on the same machine as the zap2epg.py script, you should be able to leave this as 127.0.0.1


<setting id="tvhport">9981</setting>

The port number of the tvheadend backend server. If located on the same machine as the zap2epg.py script and you have not changed this, you should be able to leave this as 9981


<setting id="tvhmatch">true</setting>

This sets the option to pull the channel service name from the tvheadend and add it to the list of names that are included in the xmltv.xml file for each channel. This is useful as it allows tvheadend to automatically match the channel to the epg source of the zap2epg generated xmltv.xml file so you don't have to do it manually for each channel. Set to true to enable and false to disable.


<setting id="chmatch">true</setting>

This is a deprecated setting that will be removed in the 1.0 release of zap2epg. This sets the option to find channels with missing subchannel numbers and attempts to determine and append the subchannel number. Zap2it has fixed their subchannel number issue so this setting will be removed in a future update.


The next 20 settings are used to set the order and type of information that is appended to the program description when the xdesc setting is enabled. Each of the settings use the following format:

<setting id="desc01">10</setting>

All 20 settings need to be included with a increasing setting id for each.

<setting id="desc01">10</setting>

<setting id="desc02">18</setting>

<setting id="desc03">6</setting>

etc...etc... up to <setting id="desc20">0</setting>

Each setting will add information that will be appended to the program description in the order of 1 through 20. For each of those settings, the options available are listed below and can be used in any order and as many times as you like. Just enter the number of the option you want into the setting.

  • 1 BULLET •
  • 2 NEWLINE inserts the new line code (like a paragraph return)
  • 3 HYPHEN -
  • 4 SPACE
  • 5 COLON :
  • 6 VBAR |
  • 7 SLASH /
  • 8 COMMA ,
  • 9 PLOT the plot description
  • 10 NEW adds the word NEW if program is new
  • 11 HD adds HD if the program is in HD (not currently available from zap2it)
  • 12 CC adds CC if the program is closed captioned
  • 13 SEASON the season and episode numbers
  • 14 RATINGS the TV rating of the program
  • 15 DATE the original air date
  • 16 PROG the name of the program
  • 17 EPIS the episode name of the program
  • 18 EPISQTS the episode name of the program in quotes
  • 19 CAST the cast list
  • 20 MYEAR the year a movie was released