[fixed] No connection to TV Server (1 Viewer)

elliottmc

Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Yep, there's no question that this is the problem. However, nothing useful logged.

    To reproduce this, just find the entry for 'channel' in MediaPortal.xml, delete it, run MP and go to the TV guide. Boom.

    Can anyone else verify this, to make sure it isn't just me?
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Yep, there's no question that this is the problem. However, nothing useful logged.

    To reproduce this, just find the entry for 'channel' in MediaPortal.xml, delete it, run MP and go to the TV guide. Boom.

    Can anyone else verify this, to make sure it isn't just me?

    I can not confirm this! If I delete "channel" in mediaportal.xml it defaults to the first channel in the channel group after entering the TVGuide in MP and writes this as "channel" in the mediaportal.xml.

    1.jpg


    PS: Did you only delete the channel name in <entry name="channel">Das Erste HD</entry> or the whole tag <entry name="channel">Das Erste HD</entry>. In my test I deleted the whole tag.
     
    Last edited:

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    I deleted the whole tag. Are you on singleseat? I am on multiseat, not that it ought to matter. This is 100% reproducible for me.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Yes, I'm on single seat.
    I guess we need more testers since it is really a 1min test.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Yes, I'm on single seat.
    I guess we need more testers since it is really a 1min test.

    It may also depend on what channel number is returned. I am adding logging to try to get to the bottom of this.

    Mark

    Here is a related team thread posted by Mike in mantis: https://forum.team-mediaportal.com/threads/issue-with-epg.109917/
    From MP 1.2.x to MP 1.3.x the TVGuide behaviour was changed in a way that always the latest channel is focused. In MP 1.2.x always the first channel of the channel group was focused by default.
     
    Last edited:

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Yes, I'm on single seat.
    I guess we need more testers since it is really a 1min test.

    It may also depend on what channel number is returned. I am adding logging to try to get to the bottom of this.

    Mark

    Here is a related team thread posted by Mike in mantis: https://forum.team-mediaportal.com/threads/issue-with-epg.109917/
    From MP 1.2.x to MP 1.3.x the TVGuide behaviour was changed in a way that always the latest channel is focused. In MP 1.2.x always the first channel of the channel group was focused by default.

    Yes, this is kind of the point. However, the commit that introduced it changed so many things that I think it would be hard to work out what is needed and what is not.

    Best to try to debug the problem.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    It may also depend on what channel number is returned. I am adding logging to try to get to the bottom of this.

    Mark

    Here is a related team thread posted by Mike in mantis: https://forum.team-mediaportal.com/threads/issue-with-epg.109917/
    From MP 1.2.x to MP 1.3.x the TVGuide behaviour was changed in a way that always the latest channel is focused. In MP 1.2.x always the first channel of the channel group was focused by default.

    Yes, this is kind of the point. However, the commit that introduced it changed so many things that I think it would be hard to work out what is needed and what is not.

    Best to try to debug the problem.

    I don't know how hard it is but @jameson_uk already provided a patch to revert the behaviour back to MP 1.2.x -> https://forum.team-mediaportal.com/threads/issue-with-epg.109917/page-4#post-888230 . There is also a "fix" from @mm1352000 here for another problem: https://forum.team-mediaportal.com/threads/issue-with-epg.109917/page-4#post-888373 - Seems like this team thread got kinda lost. :p
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    With added logging as follows:

    Code:
        private void LoadSettings()
        {
          using (Settings xmlreader = new MPSettings())
          {
            String channelName = xmlreader.GetValueAsString("mytv", "channel", String.Empty);
            TvBusinessLayer layer = new TvBusinessLayer();
            IList<Channel> channels = layer.GetChannelsByName(channelName);
    
    Log.Error("LoadSettings running");
    
    
            if (channels != null && channels.Count > 0)
            {
              _currentChannel = channels[0];
            }
            PositionGuideCursorToCurrentChannel();


    and

    Code:
        private void PositionGuideCursorToCurrentChannel()
        {
          _cursorX = 0;
          _cursorY = 1; // cursor should be on the program guide item
          ChannelOffset = 0;
    
    Log.Error("PositionGuideCursorToCurrentChannel() running");
    
    
          // Attempt to position to the current channel in the new list of channels.  If the channel is not in
          // the group then the first channel in the group is selected.
          bool channelInGroup = false;
          for (int i = 0; i < _channelList.Count; i++)
          {
            Channel chan = ((GuideChannel)_channelList[i]).channel;
            if (chan.IdChannel == _currentChannel.IdChannel)
            {
              _cursorX = i;
              channelInGroup = true;
              break;
            }
          }
          if (channelInGroup)
          {
            Log.Error("PositionGuideCursorToCurrentChannel: channelInGroup is true!");
            while (_cursorX >= _channelCount)
            {
              _cursorX -= _channelCount;
              ChannelOffset += _channelCount;
            }
              Log.Error("PositionGuideCursorToCurrentChannel: channelInGroup is true!");
              Log.Error("_cursorx = {0}. ChannelOffset = {1}", _cursorX, ChannelOffset);
          }
          else
          {
              Log.Error("PositionGuideCursorToCurrentChannel: channelInGroup is false!");
              ChannelOffset = 1;
          }
        }

    all I see in logs is

    Code:
    2012-12-15 18:20:33.899000 [ERROR][MPMain(1)]: LoadSettings running
    2012-12-15 18:20:33.900000 [ERROR][MPMain(1)]: PositionGuideCursorToCurrentChannel() running

    So why doesn't it get to the second bit of logging in PositionGuideCursorToCurrentChannel ?
     

    Users who are viewing this thread

    Top Bottom