Feature #5686
Allow keeping up to a specified amount of epg data
0%
Description
Currently, it seems that old epg data is removed. It would be usefull to keep old data for up to a specified amount of days (like 7 days for example).
This old data can be used to search for recently aired programs online (and this works really nice when integrated with Kodi addons for example that do just that).
History
Updated by saen acro over 5 years ago
It's useless when there is no live event from past ;)
If some one make timeshift option usefully for this case it can be done.
Updated by Michaël Arnauts over 5 years ago
It's not as useless as you might think. I use Kodi as a the client for tvheadend, and I can use the guide to play old programs from an add-on associated with the channel.
This makes it really easy to play old programs that aren't recorded in tvheadend, but are available online.
Looking at the code, the change seems really simple. Would this be accepted as a pull request?
Updated by saen acro over 5 years ago
Export epg end save for this add-on's
Same thing do Ministra portal
Updated by Michaël Arnauts over 5 years ago
This would mean a big change in the tvheadend integration in kodi (https://github.com/kodi-pvr/pvr.hts) since this uses the tvheadend api to provide guide data to kodi.
I use the kodi pvr guide to play recent broadcasts (with the help of a contextmenu, see https://github.com/michaelarnauts/context.pvr.justmissed), so exporting the epg every few hours doesn't help here.
This is the change I'm proposing: https://github.com/tvheadend/tvheadend/compare/master...michaelarnauts:epgkeep
Updated by Michaël Arnauts over 5 years ago
Hmm, never mind, I took a closer look at the source and it seems tvheadend quite extensive depends on the first item to be the current airing item
Updated by saen acro over 5 years ago
install Ministra portal there is all you need to store epg to database
https://wiki.infomir.eu/eng/ministra-tv-platform
https://github.com/1187/stalker_portal
Updated by Em Smith over 5 years ago
On Kodi settings for PVR & LiveTV, go to expert settings, then go to Guide and increase "Past Days to Display". Then Kodi will keep the previous days in the tv guide, up to.a maximum of 31 days.
Note: This is Kodi settings, not Kodi pvr.hts settings or Tvheadend settings.
Updated by Sami Markkanen about 4 years ago
I've been developing a Python-based HTTP server providing a mobile-friendly TV guide for Tvheadend (with some optional Kodi integration like switching channels and notifying about favorites). Accessing old EPG data would be very useful, as my guide tries to be helpful with all the reruns by letting users browse past episodes from last 2 weeks (by default) to easily see which ones were recorded or missed.
Right now my software works around this by cloning all EPG data (including asynchronous changes) to another database, which is troublesome, to say the least. I'm not sure if my project will ever be polished enough for a public release, but access to old data sure would help simplifying things and ironing out glitches.
Updated by Michaël Arnauts about 4 years ago
I've made a patch a while ago for TVHeadend to keep 7 days of EPG data.
You can find it here: https://github.com/michaelarnauts/context.pvr.justmissed#tvheadend
Updated by Sami Markkanen about 4 years ago
Thanks, Michael. That's a good start, so I'll start testing with a patched version. Hardcoding is a bad habit, of course, so ultimately the timespan should be configurable, perhaps even through the API.
Have you noticed any side effects running with the patch?
Updated by Michaël Arnauts about 4 years ago
The web UI would also display the past programs, making the EPG view a bit confusing. Other then that, I don't think it causes any issues.