Check this,

Admin


- Create a template custom.channels.xml
This assumes you have already run the streamrefupdate.py file as per above guide, You will need to run another python script which will create a new file called custom.channels.xml in your /etc/epgimport/ folder, the guide on running the script is @ How to automatically create your custom.channels.xml from IPTV bouquet

- map channel ID from epg data source to custom.channels.xml
Download and open the custom.channels.xml file as created earlier and replace the placeholder text with the channel ID from the epg data source on the line matching the channel you want the epg data assigned to.

- Create custom.sources.xml
This file ties all the others together and is the main reference file for the epgimport plugin, all files mentioned above need to be correctly referenced in this file otherwise the data will not be imported and the epg assigned to the IPTV stream. Note that file names are very case sensitive.
The below is the basic complete custom.sources.xml file copy it and save into a file called custom.sources.xml

<sources>
<source type="gen_xmltv" channels="/etc/epgimport/custom.channels.xml">
<description>US TV Guide EPG</description>
<url>/etc/epgimport/NAME OF EPG DATA FILE</url>
</source>
</sources>

For more infos : https://www.techkings.org/threads/how-to-assign-epg-to-iptv-streams.120096/
_________________________