Add EPG for Xtream UI IPTV Panel

Go to Your Panel -> EPG  -> Add EPG. Add the EPG URL you want to use, found in “My EPG” section on site.

 

EPG Xtream UI IPTV Panel

 

After clicking the “Add” button click the “Force EPG Reload”. System will check if the given source file is in valid EPG XMLTV Format and load the channels into Xtream UI database.

 

EPG Xtream UI IPTV Panel

 

Now we have to match your streams with the EPG we just added, the XMLTV Files contains channel id so we need to tell the system where the channel id of XML File should be assigned to, so we can fetch the EPG data to specific channel only.

 

For this, we need to go to Your Panel -> Streams -> Manage Streams -> Find the stream you want and click the “edit” button

 

Go to the section called “EPG“.

 

EPG Xtream UI IPTV Panel

 

From there you have to choose the EPG Source ( you added it in first step), the EPG Channel ID that your stream should be assigned to and EPG Language for your EPG Data. The language shown in the list is being fetched from the XMLTV File. If no languages are available you can leave this blank. If languages are available you must choose one.

To save your settings click the “Next” button and then the “Edit” button.

 

Note 1: After assigning the EPG with your streams, the EPG must be reloaded in the panel. There is a cronjob running for Xtream UI Panel that updates the EPG data automatically every day, please make sure this cronjob run once every 24 hour. To many requests can result in a temporary suspension. In case you don’t want to wait for the cronjob to run, you can Force Reload the EPG data by going to:

 

Your Panel -> EPG  -> Click the “Force EPG Reload” button:

 

EPG Xtream UI IPTV Panel

 

 

Note 1:  To share the EPG to other another software/app that is asking for a separate URL for the EPG then you can use your normal M3U file but edit it and change the bit that says “get.php?” with “xmltv.php?”

 

Example: http://domain.iptv.com:8888/xmltv.php?username=username&password=password

 

Note 2:  If the EPG is not updating automatically please make sure the cronjob is running at least once every 24 hours.  We recommend changing the cronjob to run at a different hour and apply the Mysql fix below.

 

Change Cronjob

 

1. Login to SSH as root and run this command: nano /var/spool/cron/crontabs/xtreamcodes

 

2. Find this line: 0 1 * * * /home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg.php # Xtream-Codes IPTV Panel

 

The cron runs standard 1 am. Change the first 5 fields to something different.  This example will run at 04:15 am: 15 4 * * * /home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg.php # Xtream-Codes IPTV Panel

 

3. Save the file and dont forget to execute this command to lock the file from changes: chattr +i /var/spool/cron/crontabs/xtreamcodes

 

MySQL Fix

 

1. Login to SSH as root and run this command: nano /etc/mysql/mysql.cnf

 

2. Add max_execution_time=30000 below the existing string “table_definition_cache = xxxx” and save the file.

 

3. Restart MySQL:  sudo service mysql restart

 

4. Run this command in SSH to force update the EPG:  sudo /home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg.php

 

EPG Cron Fix

 

1. Backup the original cron: cp /home/xtreamcodes/iptv_xtream_codes/crons/epg.php /home/xtreamcodes/iptv_xtream_codes/crons/epg_bak.php

 

2. Replace original epg.php:  wget "https://pastebin.com/raw/8kheQ3Ey" -O /tmp/epg.php -o /dev/null;sudo rm -rf /home/xtreamcodes/iptv_xtream_codes/crons/epg.php; sudo cp /tmp/epg.php /home/xtreamcodes/iptv_xtream_codes/crons/; chown -R xtreamcodes:xtreamcodes /home/xtreamcodes/; rm /tmp/epg.php;

 

3. Run this command in SSH to force update the EPG:  sudo /home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg.php

 

If you have any questions please open a support ticket and we will help you.