Setting EPG history can cause the EPG to open on a previous page

Issue #724 resolved
Tim Wundke created an issue

I have my main graphical EPG (EPG_TYPE_GRAPH) set to show 120 minutes of data (config.epgselection.graph_prevtimeperiod), with 120 minutes of history (config.epg.histminutes), and a base time/snap interval of 30 minutes (config.epgselection.graph_roundto). However, when I open the EPG it initially only shows the history period, requiring a right button press to show the current time marker, which is quite annoying.

I have a fairly simple fix – pull request coming – that simply always places history on the previous page. With a little more work it could always show as much history as possible on open, while still showing the current time marker, but I’m not entirely sure of the benefit of this (history is, after all, history, so it kinda makes sense to require a left button press to view it).

Comments (7)

  1. Peter Urbanec

    I like seeing recent history and in my configuration the split gives me about 20% history with the remainder showing upcoming events. It’s a convenient method for seeing what is in timeshift, without having to skip. I’m not keen on changing the existing behaviour to always align the current time with the left edge.

    Maybe the trick is to have two settings:

    <item level="2" text="Keep old EPG for minutes" description="Set the number of minutes that finished events remain in the EPG. This is useful when you need information about an event which has just ended or has been delayed.">config.epg.histminutes</item>
    <item level="2" text="Show old EPG for minutes" description="Set the number of minutes of EPG history that are visible when the EPG opens.">config.epg.show_histminutes</item>
    

    With such a change, it should be possible to increase the limits for the EPG cache to a fairly generous value, but keep the default view history short.

    Such changes will require a bit of testing to ensure that there are no unexpected side-effects. Places to look at are: setup.xml, EpgList.py, UsageConfig.py and EpgSelection.py

  2. Tim Wundke reporter

    Hi @Peter Urbanec , my concern with your suggested approach is that there's potential for some user confusion, and for conflicts with the current graphical-EPG-specific settings relating to how much info is displayed (“base time” and “visible time period”). For example, if I set “Show old EPG” to 90 minutes, what happens if I’ve configured the EPG to only display 60 minutes of data? I’m also assuming that the setup code doesn’t allow us to link settings, so it’s possible to configure, say, “Keep old EPG” to 30 and “Show old EPG” to 60.

    I think it all starts to get a bit messy and hard for someone to understand what’s going to happen.

    My proposed solution (which I've coded and pushed for you to have a look at) is to instead provide graphical-EPG-specific settings called "Visible history" (config.epgselection.graph_visiblehistory), with values of "None", "Minimal", "Balanced" and "Maximum". These actually just translate into percentage values that indicate how much of the EPG we should attempt to dedicate to history when opened (0, 25%, 50% and 75%). What it's really trying to do underneath is position the "current time" marker at those offsets when the EPG opens, which may or may not have much effect depending on the other settings mentioned earlier ("base time", "visible period", etc). I've mentioned that possibility in the config description text so that people aren't too surprised.

    Note that I’ve used “fuzzy” descriptive options (“Minimal”, “Balanced”, “Maximum”) as to me it kinda makes more sense than using the percentages, especially given that it all depends on how everything else is configured; the “fuzzy” words hopefully limit user expectations, rather than concrete percentages. Not entirely sure if that’s the best option though. Happy for further input.

  3. Peter Urbanec

    Re #724 [EpgSelection] When the graphical EPG is opened it now ignores any configured history, which ensures that the opened "page" contains the current time marker.

    → <<cset a5fa1cd3add3>>

  4. Peter Urbanec

    Re #724 EpgSelection now calculates the start position for the graphical EPGs by taking into account a new config parameter indicating how much history to show. The parameter is config.epgselection.xxx_visiblehistory. Updated setup.xml and UsageConfig with the config information.

    → <<cset aaf6f30d906d>>

  5. Peter Urbanec

    Re #724 [EpgSelection] Snap (roundto) now correctly accounts for timezones on half-hour boundaries. This works for entering a manual date/time, and using the "0" and "5" keys on the number pad. Also cleaned up some comments.

    → <<cset fe5b86597dfd>>

  6. Log in to comment