Kodi Community Forum

Full Version: EPG guide pseudo entries
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to add entries to the EPG for stations that will trigger a manual single or recurring timer. Does iUniqueBroadcastId  need to be unique for the session or can I reset it each call?

It will not be on recordings or on the timers if Kodi requests the timer information from the backend so there will be a limitation on cancelling the recording from the guide, but the end result will still make it easier to create manual recordings.

Martin
(2019-12-18, 19:23)emveepee Wrote: [ -> ]I want to add entries to the EPG for stations that will trigger a manual single or recurring timer. Does iUniqueBroadcastId  need to be unique for the session or can I reset it each call?

It will not be on recordings or on the timers if Kodi requests the timer information from the backend so there will be a limitation on cancelling the recording from the guide, but the end result will still make it easier to create manual recordings.

Martin


Unique across (!) sessions.
I meant unique in each call for an epg update.  Thinking about it I can use the start time and then it won't matter.  It will never be returned to the server.

Martin
(2019-12-18, 23:34)emveepee Wrote: [ -> ]I meant unique in each call for an epg update.  Thinking about it I can use the start time and then it won't matter.  It will never be returned to the server.

Martin

No idea what exactly you are trying to achieve, for me this feels like hacks so far.

Identity of an EPG tag must not be the start time as the start time of the programme might change even during a "Kodi session". Think of sports events lasting longer than originally planned, that could result in adjusting the end time of that event and start and end time of some following programmes.
Is the problem you are trying to solve that that there are channels without EPG or with gaps in the programme timeline and that in EPG window those gaps do not have any context menu entries to schedule any manual timers?

If so, this should be implemented in PVR core not in an add-on that fakes EPG data.
I am not trying solve the gap problem which I have seen in OTA guide or for times a station is off the air.  For the solution I was considering I also didn't see it addressing the problem that North American ATSC OTA data is often very short, as these could report data, or any short source for that matter.

The purpose is to make channels that report no EPG available function more like stations with data

- allow point and click series and program timers
- allow instant recording of live tv
- provide a consistent interface in live tv while timeshifting.
- prevent Kodi from requesting EPG updates when data doesn't exist on startup and on updateemptytagsinterval
- consistent with the NextPVR browser and desktop app

I understand that this is only a hint but the timers can be corrected afterwards if the show is shorter or longer than originally started.

I see this would benefit

- casual users who don't want to use any EPG
- some radio listeners (I have have many clear QAM radio stations with no data, plus some IPTV internet radio streams)
- IPTV users with no rich EPG source

Martin
(2019-12-19, 16:52)emveepee Wrote: [ -> ]I am not trying solve the gap problem which I have seen in OTA guide or for times a station is off the air.  For the solution I was considering I also didn't see it addressing the problem that North American ATSC OTA data is often very short, as these could report data, or any short source for that matter.

The purpose is to make channels that report no EPG available function more like stations with data

- allow point and click series and program timers
- allow instant recording of live tv
- provide a consistent interface in live tv while timeshifting.
- prevent Kodi from requesting EPG updates when data doesn't exist on startup and on updateemptytagsinterval
- consistent with the NextPVR browser and desktop app

I understand that this is only a hint but the timers can be corrected afterwards if the show is shorter or longer than originally started.

I see this would benefit

- casual users who don't want to use any EPG
- some radio listeners (I have have many clear QAM radio stations with no data, plus some IPTV internet radio streams)
- IPTV users with no rich EPG source

Martin


So it is exactly what I pointed out and what I call the gap problem. You want to fake EPG tags for times where there is no actual EPG data provided in order to get for example a context menu for those special (gap) entries.

Good idea, but this should be implemented in Kodi core. Everything else will end in a semi functioning solution only and it would be not good in terms of UI consistency as every add-on could do it differently.
Fair enough, although given EPG data, recordings, and manual recordings are all optional I don't foresee any level of consistency.  

I can do this fairly soon as I expect to have a better Matrix build environment setup next week.  

Rather then creating a new property I propose these values in iUniqueBroadcastId lower then EPG_TAG_INVALID_UID so documentation would change.

I foresee several returns with the EPG_TAG

no data on error  (functions like today)
and optionally
no data available (create placeholders)
gaps in data (create placeholder or leave blank to function like today to request updates)
off air (no place holders)

A placeholder should be able to be recorded meaning the backend needs to support manual recordings and editing manual recordings.  The client would do this based on iUniqueBroadcast Id.

For continuity only startTime and endTime are required,  and these will be startTime and endTime of the range.  

If placeholders are requested, the core would create them on the hour each hour.    9, 10, 11, 12, 1pm 2pm etc.  if the start is not on the hour, a partial record would be created ending on the hour.  If endTime could create a placeholder ending after endTime of the request as today.

Use generic "No Listing" for the strEpisodeName, perhaps "To Be Announced" for gaps and also "Off Air" 

It would be nice to use specific unused but reserved genre colours for off air and placeholders let me know on this one.

Out of scope for me

- gui configuration of placeholder duration
- gui configuration to show the title in the guide.  It can look quite ugly with no date
- showing manual recordings on the guide.  This would be part a bigger PR to show manual recordings in the guide based on time channel whether or not EPG data is available.

This is more complicated then the 15 or 20 lines of code I saw in the plugin but seems straight forward.  Testing of things like  PPV events which are primarily off air might take some a bit of thought.

Martin
(2019-12-20, 16:13)emveepee Wrote: [ -> ]Fair enough, although given EPG data, recordings, and manual recordings are all optional I don't foresee any level of consistency.  

I can do this fairly soon as I expect to have a better Matrix build environment setup next week.  

Rather then creating a new property I propose these values in iUniqueBroadcastId lower then EPG_TAG_INVALID_UID so documentation would change.

I foresee several returns with the EPG_TAG

no data on error  (functions like today)
and optionally
no data available (create placeholders)
gaps in data (create placeholder or leave blank to function like today to request updates)
off air (no place holders)

A placeholder should be able to be recorded meaning the backend needs to support manual recordings and editing manual recordings.  The client would do this based on iUniqueBroadcast Id.

For continuity only startTime and endTime are required,  and these will be startTime and endTime of the range.  

If placeholders are requested, the core would create them on the hour each hour.    9, 10, 11, 12, 1pm 2pm etc.  if the start is not on the hour, a partial record would be created ending on the hour.  If endTime could create a placeholder ending after endTime of the request as today.

Use generic "No Listing" for the strEpisodeName, perhaps "To Be Announced" for gaps and also "Off Air" 

It would be nice to use specific unused but reserved genre colours for off air and placeholders let me know on this one.

Out of scope for me

- gui configuration of placeholder duration
- gui configuration to show the title in the guide.  It can look quite ugly with no date
- showing manual recordings on the guide.  This would be part a bigger PR to show manual recordings in the guide based on time channel whether or not EPG data is available.

This is more complicated then the 15 or 20 lines of code I saw in the plugin but seems straight forward.  Testing of things like  PPV events which are primarily off air might take some a bit of thought.

Martin

Sounds okay in general.

Please do not expect to much support from my end on this as I'm currently very short on time for Kodi.

EDIT: I would prefer if you stay a bit patient and let me do the implementation. I understood what you want and I guess if I implement it this will be far more efficient than doing several rounds to discuss and polish your implementation. I already read in your last post some things that won't work, but have not enough time to explain this in detail, sorry. [emoji6]
Not a problem. It will give me a chance to look into another potential core improvement, getting the last EPG update time from the backend and checking this against the already stored database time, to avoid unnecessary calls on startup and the EPG purge after sleep. 

Martin