@stingray13 - thanks for the modified script. Looking thru it I see (some of) the differences but I don't think that fixes the issue I experienced.
It isn't the tvg-name that's the issue for me. It's a mismatch between the epg (xmltv.xml) file and the m3u file.
I'll walk thru an example:
In the m3u file for BBC 1, which suffers (initially) from no epg, the line is,
#EXTINF:-1 tvg-id="" tvg-name="UK: BBC 1" tvg-logo="
http://example.com/guide/logos/BBC One.png" group-title="UK",UK: BBC 1
http://example.com:2052/live/USERNAME/PASSWORD/819.ts
Once Suls script has run (0.76 but same behaviour in older versions), the line in the sort-current.xml file is
<channel name="
UK: BBC 1" nameOverride="" tvg-id="" enabled="true" category="UK" serviceRef="0:0:0:000a:0000:000a:0:0:0:0" clearStreamUrl="false" />
[I've zero'd out the service ref] The channel name in the sort-current.xml file matches the m3u file. I would expect it to, as the m3u file is used to generate the sort-current.xml file.
Now, the programme line in the epg file is:
<programme start="20180925104500 -0400" stop="20180925113000 -0400"
channel="UK: BBC1" ><title>Garden Rescue</title><desc>Charlie Dimmock and Harry and David Rich compete to design a £3,000 Ibiza-themed party garden for a family in Wokingham.
</desc></programme><programme start="20180925113000 -0400" stop="20180925121500 -0400" channel="UK: BBC1" ><title>Antiques Road Trip</title><desc>It is the second leg with experts James Braxton and Arusha Irvine heading down the west coast from Cumbria to Liverpool, and curious military items are among the desired purchases.
</desc></programme>
The crux of the problem is the two tags (one from the m3u file & same in the sort-current.xml file) do not match the tag in the epg file.
Tag from m3u & sort-current file =
UK: BBC 1
Tag from epg file =
UK: BBC1
It's this mismatch that results in no EPG data being loaded for the channel.
Sorry if the above is teaching grandma to suck eggs, but I just wanted to make sure, I've got the problem (as I see it) across correctly.
In my case, I didn't think making any change to e2m3u2bouquet-name.py would resolve this issue as there isn't anything intrinsically wrong with the m3u file provided.
The issue lies with the epg file - xmltv.xml. I did think of modifying whatever script epg-importer uses such that when it process the xmltv.xml file in the initial definition section at beginning, when it sees entries such as
<channel id="UK: BBC1"><display-name>UK: BBC 1</display-name><icon src="
http://example.com/guide/logos/BBC One.png" /></channel>
it uses the display-name to match from the bouquet files from suls plugin but in those instances where the channel-id is different in the channel definition [as in the above line] to use the channel id value, as that is what will appear in subsequent programme tags in the xml. But gave up. LOL
It took a bit of time, but initially it was easier for me to just to take the epg file - remove all the programme info block, leaving the initial channel definitions, scroll thru and find those where the channel id NOT EQUAL display-name and in the sort-override file, set the nameOverride value to match the channel id value (from the channel definition line) from the epg file.
Hopefully the above makes sense.
I've seen epg events go from loading around 3k to 17k. And that's just with "fixing" the US and UK sections of the override file. I haven't got around to doing sport yet. LOL
I might get around to looking for the epg-importer source code and having a look.