Closed paul-chambers closed 2 years ago
@paul-chambers The playlist generated by my docker container already does this :) https://github.com/matthuisman/frndlytv-for-channels/blob/master/app.py#L98
It fetches them from https://i.mjh.nz/frndly_tv/app.json and then populates the playlist.
I think even maybe that those IDS you are getting above from the Channels EPG are originally getting set by my playlist
Ah, so it does. - my bad. I hadn't actually looked at the m3u file carefully until now.
I originally set up the 'custom channels' source using the XMLTV URL your code also generates, but my Channels DVR instance only showed the schedule for one channel, for some reason. You could well be right - the Gracenote IDs were there internally in Channels DVR, but something probably needed to be manually kicked in the pants after I removed the XMLTV URL from the custom channel settings, to get that section of the Guide repopulated with Gracenote data.
I wrote a tool that pulls the channel -> Gracenote ID mapping directly from the current Channels DVR EPG configuration (see https://github.com/Channels-DVR-Goodies/extractChannelIDs). I couldn't find a good way to look up the corresponding Gracenote ID from a channel name, and Gracenote wanted to charge me hundreds of dollars a month for access to their API. So I found a work around :) The only other option would have been to use the 'Scheduiles Direct' API, but it didn't look like that was permitted under the Schedules Direct acceptable use policy.
I used my tool to extract the table below, which lists the Gracenote ID for each of the FrndlyTV channels (that work for me, at least).
You could use this information to populate the optional
tvc-guide-stationid
tag in the M3U file you're generating. This means Channels can auto-configure the listings info on import, without needing the XMLTV EPG file at all.Sorry, I'm not proficient with Python, or this would be a pull request instead :)