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

Nox71

Portal Member
May 5, 2005
21
0
I just installed MP 1.3.0 BEta from scratch (since the upgrade of 1.3.0 Alpha had corrupt MP files) and now my client is unable to connect to the TV Server.

I have include the log file and one thing to know isn that on another computer that is also a client the TV is working fine even on the server itself.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello Nox71

    I think the problem is your Gentle.config file:
    Check the connection string: Server=localhost;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;

    Please check the Gentle.config file on the server (c:\ProgramData\Team MediaPortal\MediaPortal TV Server\Gentle.config).
    You can open it in any text editor.
    Make sure the <DefaultProvider .../> section is correct. It must *not* contain localhost or 127.0.0.1.

    @elliottmc FYI, this is the issue that the gentle.config fix is meant to resolve.

    mm
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Hello Nox71

    I think the problem is your Gentle.config file:
    Check the connection string: Server=localhost;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;

    Please check the Gentle.config file on the server (c:\ProgramData\Team MediaPortal\MediaPortal TV Server\Gentle.config).
    You can open it in any text editor.
    Make sure the <DefaultProvider .../> section is correct. It must *not* contain localhost or 127.0.0.1.

    @elliottmc FYI, this is the issue that the gentle.config fix is meant to resolve.

    mm

    @mm1352000 - if @Nox71 confirms that this is the case, do you think we should include this in 1.3.0RC ? If so, we need to start testing it now for any regression.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I think the fix risk is relatively low, so yes I'd like to see it in the release candidate.
    We always get a few reports like this with new releases and IMO it is high time we get to the bottom of the problem.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Hello Nox71

    I think the problem is your Gentle.config file:
    Check the connection string: Server=localhost;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;

    Please check the Gentle.config file on the server (c:\ProgramData\Team MediaPortal\MediaPortal TV Server\Gentle.config).
    You can open it in any text editor.
    Make sure the <DefaultProvider .../> section is correct. It must *not* contain localhost or 127.0.0.1.

    @elliottmc FYI, this is the issue that the gentle.config fix is meant to resolve.

    mm

    @mm1352000 - if @Nox71 confirms that this is the case, do you think we should include this in 1.3.0RC ? If so, we need to start testing it now for any regression.

    As far as I know we are testing it at the moment. @Sebastiii posted a link in Area51 Thread already. :)
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    I think the fix risk is relatively low, so yes I'd like to see it in the release candidate.
    We always get a few reports like this with new releases and IMO it is high time we get to the bottom of the problem.

    +100! :D
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Right, I have tested, and there are actually 2 issues.

    If I install a build with this fix on the client, and set the server name in config, then start MP, and go straight to the EPG, I see the screenshot with the problem EPG.

    However, if I go to TV home and click on 'channel', then I see the channel info, so the client is definitely connecting to the server.

    So, here's what I think is happening.

    1. This fix is fine. Several people confirm this, so we should merge to master.

    2. The problem I am seeing is that MP is trying to open the EPG at the last used channel, but there isn't one.

    I can confirm this by resetting gentle.config but adding

    <entry name="group">Main Channels</entry>
    <entry name="channel">ITV1 Wales</entry>

    to MediaPortal.xml, and then everything behaves correctly.

    So, merge 4088 to master, then then mantis the EPG problem for @ajp8164 since this is his area?
     

    Attachments

    • 14-31-23.png
      14-31-23.png
      518.5 KB
    • 14-31-55.png
      14-31-55.png
      391.3 KB

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    In TVGuideBase.cs we have

    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);
            if (channels != null && channels.Count > 0)
            {
              _currentChannel = channels[0];
            }
            PositionGuideCursorToCurrentChannel();
    
            _byIndex = xmlreader.GetValueAsBool("mytv", "byindex", true);
            _showChannelNumber = xmlreader.GetValueAsBool("mytv", "showchannelnumber", false);
            _channelNumberMaxLength = xmlreader.GetValueAsInt("mytv", "channelnumbermaxlength", 3);
            _timePerBlock = xmlreader.GetValueAsInt("tvguide", "timeperblock", 30);
            _hdtvProgramText = xmlreader.GetValueAsString("mytv", "hdtvProgramText", "(HDTV)");
            _guideContinuousScroll = xmlreader.GetValueAsBool("mytv", "continuousScrollGuide", false);
            _loopDelay = xmlreader.GetValueAsInt("gui", "listLoopDelay", 0);
    
            // Load the genre map.
            if (_mpGenres == null)
            {
              _mpGenres = RemoteControl.Instance.GetMpGenres();
            }
          }
    
          // Load settings defined by the skin.
          LoadSkinSettings();
    
          // Load genre colors.
          // If guide colors have not been loaded then attempt to load guide colors.
          if (!_guideColorsLoaded)
          {
            using (Settings xmlreader = new SKSettings())
            {
              _guideColorsLoaded = LoadGuideColors(xmlreader);
            }
          }
    
          _useNewRecordingButtonColor =
            Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile(@"\media\tvguide_recButton_Focus_middle.png"));
          _useNewPartialRecordingButtonColor =
            Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile(@"\media\tvguide_partRecButton_Focus_middle.png"));
          _useNewNotifyButtonColor =
            Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile(@"\media\tvguide_notifyButton_Focus_middle.png"));
          _useHdProgramIcon =
            Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile(@"\media\tvguide_hd_program.png"));
        }

    and

    Code:
        private void PositionGuideCursorToCurrentChannel()
        {
          _cursorX = 0;
          _cursorY = 1; // cursor should be on the program guide item
          ChannelOffset = 0;
    
          // 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)
          {
            while (_cursorX >= _channelCount)
            {
              _cursorX -= _channelCount;
              ChannelOffset += _channelCount;
            }
          }
        }

    So what happens if there is no current channel group defined, or if channelInGroup is false?
     

    Users who are viewing this thread

    Top Bottom