[fixed] EPG - Inconsistent behaviour when scrolling with page up/down (2 Viewers)

mm1352000

Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    The attached logs are from debug mode. Start MP / enter EPG / Down two steps to 3 / Press page up and end up at 67 / Press page down and end up at 72 / A final page down wraps the list to 1.
    //Johannes
    Ah, now I really *can* reproduce! It doesn't seem to be consistent yet - trying to spot the pattern.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Okay, here is what I see. I have 15 channels in my list. Testing wrapping with page-up, I don't get page-up stopping at the top *if I start from positions 1 through 5*. At positions >= 6 I get the page-up stopping at the top, and then a further page-up rolls around. It doesn't focus the last item in the list, which I think would be nicer. I can't reproduce with page-down, and (like I've already said) page-down takes me to the last item->another page-down takes me to the first item (which I like better than the page-up behaviour - it is also consistent with the wrapping in the mini-guide, which wraps from the last item to the first when you press the down arrow and vice-versa).
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    United Kingdom United Kingdom
    Country flag
    The attached logs are from debug mode. Start MP / enter EPG / Down two steps to 3 / Press page up and end up at 67 / Press page down and end up at 72 / A final page down wraps the list to 1.
    //Johannes
    Ah, now I really *can* reproduce! It doesn't seem to be consistent yet - trying to spot the pattern.
    If you are focused on the channel name, this happens.

    If you are focused on a program name in the EPG, it all works fine.

    If you can both confirm that this is the case, it should not be too hard to fix.

    Mark
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    If you are focused on the channel name, this happens.
    For me that makes a further difference. Focus on the channel name and the focus doesn't ever seem to stop at the first channel - it always wraps 10 (???) places around.

    If you are focused on a program name in the EPG, it all works fine.
    No, my results before were with program names. In other words, the issue occurs when you've selected a program that is within the first 5 channels. It doesn't occur if you select a program from channels greater than or equal to position 6...

    If you can both confirm that this is the case, it should not be too hard to fix.
    I'd have no idea how to fix this, so I'm glad you know. :D

    *Thank you*
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    United Kingdom United Kingdom
    Country flag
    If you are focused on the channel name, this happens.
    For me that makes a further difference. Focus on the channel name and the focus doesn't ever seem to stop at the first channel - it always wraps 10 (???) places around.

    If you are focused on a program name in the EPG, it all works fine.
    No, my results before were with program names. In other words, the issue occurs when you've selected a program that is within the first 5 channels. It doesn't occur if you select a program from channels greater than or equal to position 6...
    Okay, that is very strange. For me, I cannot reproduce the problem at all if I have focus on a program name, but there is definitely a problem when focus is on the channel name.

    Do you have time to PM Andy (ajp)? This is his area!

    Best wishes,

    Mark
     

    glenn 1990

    Portal Pro
    July 1, 2010
    247
    36
    Belgium Belgium
    If you are focused on the channel name, this happens.
    For me that makes a further difference. Focus on the channel name and the focus doesn't ever seem to stop at the first channel - it always wraps 10 (???) places around.

    If you are focused on a program name in the EPG, it all works fine.
    No, my results before were with program names. In other words, the issue occurs when you've selected a program that is within the first 5 channels. It doesn't occur if you select a program from channels greater than or equal to position 6...

    If you can both confirm that this is the case, it should not be too hard to fix.
    I'd have no idea how to fix this, so I'm glad you know. :D

    *Thank you*
    I fixed the same issue for the 4TR guide yesterday,
    I just modifed OnPageUp() a bit in guidebase.cs

    This is how it looks now.
    Code:
            private void OnPageUp()
            {
                int Steps;
                if (_singleChannelView)
                    Steps = _channelCount; // all available rows
                else
                {
                    if (_guideContinuousScroll)
                    {
                        Steps = _channelCount; // all available rows
                    }
                    else
                    {
                        // If we're on the first channel in the guide then allow one step to get back to the end of the guide.
                        if (_channelOffset == 0 && _cursorX == 0)
                        {
                            Steps = 1;
                        }
                        else
                        {
                            // only number of additional avail channels
                            Steps = Math.Min(_channelOffset + _cursorX + 1, _channelCount);
                        }
                    }
                }
    
                UnFocus();
                for (int i = 0; i < Steps; ++i)
                {
                    OnUp(true, true);
                }
                Correct();
                Update(false);
                SetFocus();
            }
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    United Kingdom United Kingdom
    Country flag
    If you are focused on the channel name, this happens.
    For me that makes a further difference. Focus on the channel name and the focus doesn't ever seem to stop at the first channel - it always wraps 10 (???) places around.


    No, my results before were with program names. In other words, the issue occurs when you've selected a program that is within the first 5 channels. It doesn't occur if you select a program from channels greater than or equal to position 6...

    If you can both confirm that this is the case, it should not be too hard to fix.
    I'd have no idea how to fix this, so I'm glad you know. :D

    *Thank you*
    I fixed the same issue for the 4TR guide yesterday,
    I just modifed OnPageUp() a bit in guidebase.cs

    This is how it looks now.
    Code:
            private void OnPageUp()
            {
                int Steps;
                if (_singleChannelView)
                    Steps = _channelCount; // all available rows
                else
                {
                    if (_guideContinuousScroll)
                    {
                        Steps = _channelCount; // all available rows
                    }
                    else
                    {
                        // If we're on the first channel in the guide then allow one step to get back to the end of the guide.
                        if (_channelOffset == 0 && _cursorX == 0)
                        {
                            Steps = 1;
                        }
                        else
                        {
                            // only number of additional avail channels
                            Steps = Math.Min(_channelOffset + _cursorX + 1, _channelCount);
                        }
                    }
                }
    
                UnFocus();
                for (int i = 0; i < Steps; ++i)
                {
                    OnUp(true, true);
                }
                Correct();
                Update(false);
                SetFocus();
            }
    Does this also correct the behaviour being different depending on whether you are focused on channel name or program name?

    Edit: wild speculation here. If 'singleChannelView' true if you are in normal EPG view but focused on the channel name? This would explain the current behaviour.

    Mark
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    United Kingdom United Kingdom
    Country flag
    Current SVN has

    Code:
        private void OnPageUp()
        {
          UnFocus();
          for (int i = 0; i < _channelCount; ++i)
          {
            OnUp(true, true);
          }
          Correct();
          Update(false);
          SetFocus();
        }
    
        private void OnPageDown()
        {
          int Steps;
          if (_singleChannelView)
            Steps = _channelCount; // all available rows
          else
          {
            if (_guideContinuousScroll)
            {
              Steps = _channelCount; // all available rows
            }
            else
            {
              // If we're on the last channel in the guide then allow one step to get back to top of guide.
              if (_channelOffset + (_cursorX + 1) == _channelList.Count)
              {
                Steps = 1;
              }
              else
              {
                // only number of additional avail channels
                Steps = Math.Min(_channelList.Count - _channelOffset - _cursorX - 1, _channelCount);
              }
            }
          }
    
          UnFocus();
          for (int i = 0; i < Steps; ++i)
          {
            OnDown(true);
          }
          Correct();
          Update(false);
          SetFocus();
        }
    So it looks as though your change simply brings 'OnPageUp' into line with OnPageDown. Actually, I can't understand why pageup works as well as it does for me. Very odd.

    Within OnUp() there are various checks for cursory == 0, which I assume is focus on channel name.

    Either way, I will test this change locally this evening, and if it works okay, then I would suggest committing it.

    Edit: Don't forget RADIO EPG as well!

    Mark
     

    glenn 1990

    Portal Pro
    July 1, 2010
    247
    36
    Belgium Belgium
    How big is your loopdelay setting in mp,
    this is may be the reason why it's working for you. (can you try a loopdelay from 0)
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    United Kingdom United Kingdom
    Country flag
    Bump.

    I don't think this is in mantis yet, and I don't want it forgotten. Looking at the code provided, I suspect it will be straightforward, to fix, but needs to be done in TV and radio EPG.

    Mark
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 2)

    OP Similar threads Forum Replies Date
    M Add Radio channels and EPG to Mediaportal xmlTV 2
    M EPG color by length of TV-show MediaPortal 1 Talk 1
    D Downloading EPG XML file: Installation, configuration support 0
    D EPG No Data General Support 2
    D [solved] EPG Data off by -20 hours? General 10
    G Q about scheduling weekly series when epg lists duplicate back to back episodes each week General Support 2
    F Mini EPG more information? WMC Skin 4
    N No TV or EPG on fresh install General 0
    framug No color in TVGuide when XMLTV without DVB EPG MediaPortal 1 Talk 59
    T Freesat EPG in UK anyone? Electronic Program Guide 78
    Dark Eyes TVService locks up or fails to restart on resuming from sleep, and crashes when grabbing EPG Installation, configuration support 7
    G Movie release date in guide Electronic Program Guide 2
    Rob Hexenmeister Navigation problems adding menu buttons to EPG General Support 1
    404 [solved] EPG problem after Win10 'upgrade' General Support 1
    CyberSimian [fixed] MP1-4990 : Improve horizontal scrolling in the EPG MediaPortal 1 10
    framug [EPG] Some problems with DVB EPG Improvement Suggestions 49
    D [solved] EPG Buddy for MP2 - Does it work? General 5
    J Understanding what EPG shows about schedules General 8
    geotwticher TV Guide EPG Grabber for Australia 2020 RIP freepg.tv General 4
    B [solved] MP2.2.3 TV Guide not scrolling with mouse wheel General 2
    HTPCSourcer Special (foreign) characters don't display correctly in EPG MediaPortal 2 4
    B How to Search MP2 for Movies only in 7 day EPG that comes from the Antenna General 3
    F EPG Buddy download Plugins & Erweiterungen 1
    P Timeshifting in XMLTV General 2
    J Odd issues with Freesat EPG - MP2 General 18
    Similar threads

























    Top Bottom