Closed MB004 closed 7 years ago
I second this!
Hi @MB004 @dbowles1975, thanks for your input.
Forgive my ignorance, but can you provide more information on what you'd like to see happening here? The way I'm reading your question is that you would like a JSON-like dictionary of tvg-id tags, to be inserted at the correct index into the m3u8.
For example, the dictionary would look like this (using your example):
tvgDictionary = {
'01': 'I16485.labs.zap2it.com',
'02': 'I10179.labs.zap2it.com',
...
}
and at the time of playlist creation, the tvg-id
tags are inserted by index (channel number).
for channel in sorted(channelDictionary, key=lambda channel: int(channel)):
m3u8 += ('#EXTINF:-1, ' + 'tvg-id="' + tvgDictionary[channel] + '", ' +
channel + ' ' + channelDictionary[channel] +
'\n' + 'http://' + server +
'.smoothstreams.tv:9100/viewstvn/ch' + channel +
'q1.stream/playlist.m3u8?wmsAuthSign=' + authSign + '\n')
resulting in a playlist looking like this:
#EXTM3U
#EXTINF:-1, tvg-id="I16485.labs.zap2it.com", 01 ESPNews
http://dna.smoothstreams.tv:9100/viewstvn/ch01q1.stream/playlist.m3u8?wmsAuthSign=abcd1234efgh5678ijkl90==
#EXTINF:-1, tvg-id="I10179.labs.zap2it.com", 02 ESPN
http://dna.smoothstreams.tv:9100/viewstvn/ch02q1.stream/playlist.m3u8?wmsAuthSign=abcd1234efgh5678ijkl90==
Is that what you're looking for? If not, please clarify. Thanks again for taking the time to submit a request like this. Cheers!
Hey stvhwrd,
Thanks for the reply and for all your work!
That was exactly what I was looking for. This format allows iptv simple client to correctly associate the playlist to a xmltv file for epg data. For example, I added your new code addition to the generator, filled in all of the linking tags to my xmltv file and get this desired output in kodi :
The only caveat seems to be if a channel is turned on in the channeldictionary, it must also be turned on in the tvgdictionary or the generator will fail. This is no problem though. If for example I do not have epg data for channel 118 (Sky Sports F1 UK) and end up with this output:
#EXTINF:-1, tvg-id="insert tag here", 118 Sky Sports F1 UK
The channel will still play correctly (without any epg info of course)
Thanks!
Please forgive my ignorance as I am not a Python person but I have tried to make the changes myself and I cannot get the script to run (runs fine without any changes). I am sure I'm overlooking something simple. Could anyone offer some assistance? Thanks.
Hi @dbowles1975, sorry for the delay in response, I overlooked your message. I'll be working on this again later this week and weekend. In the meantime, perhaps @MB004 could share his working script with you? Thanks for your engagement in this project. Stay tuned for the updates later this week. Cheers 🍻
Hey, sorry about that also lost track of this topic. I've attached my working script. I updated a few of the channels (ie, 76-83 now seem to be mostly dedicated HD versions of previous channels and 108-111 I think are always the BT channels).
So now paste any relevant epg tags into the corresponding channel number of the tvgDictionary. Put it right between the two quotation marks like so:
'01': 'I16485.labs.zap2it.com',
If` you don't have a tag for a certain channel just leave it as is. If you want to turn off any channels that SS doesn't use, make sure you turn it off in both the channel and tvg dictionaries or the script will fail.
Don't forget to edit in your login info and server choice, I almost forgot to remove mine =) sstv-playlist epg tags.zip
I've decided to close this issue. There are a couple of notable forks of this project (stankness on BitBucket, and bradmurray on GitHub) that provide the enhancements called for by this issue. Rather than mirroring the changes in those forks, I'd like to keep this project as a simple script base that people can build cool stuff off of - those forks being great examples of that.
Thanks @MB004 and @dbowles1975 for your input, hope you guys are cool with this decision.
Hi,
Would it be possible for you to insert a dictionary table into the code for '#EXTINF:-1,' as well? And then the user can edit the table with the matching tvg-id tags. This would allow the script to output a working epg format for iptv simple client. For example the working epg output would need to look as follows:
EXTINF:-1 tvg-id="I16485.labs.zap2it.com", 01 ESPNews
EXTINF:-1 tvg-id="I10179.labs.zap2it.com", 02 ESPN
(Where as the table allows for me to insert my tvg-id tags right before the comma of #EXTINF:-1,)
Thanks in advance if possible!