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

SiLenTYL

Retired Team Member
  • Premium Supporter
  • April 23, 2004
    1,144
    159
    Melbourne
    Home Country
    Australia Australia
    On the PC that has the TV card installed, open MP Config and TV Config (from the shortcuts). doublecheck u have the correct TV->TV Client name (should be the same name as the TV database name (for me its my PC hostname).
     

    TLD

    Portal Pro
    October 26, 2007
    954
    387
    Rainy Washington
    Home Country
    United States of America United States of America
    Yes it has the same IP number and the client on the TV server will show the Groups,programs and channels if i go to "Channel" in the TV section of MP
     

    Quarter

    MP Donator
  • Premium Supporter
  • June 21, 2010
    722
    138
    Queenstown
    Home Country
    New Zealand New Zealand
    I had no connection to TV server error and would freeze start up of MP, What I found it to be in my case was that I didn't check the default Database, Once I reinstalled and set it too mysql it all worked again.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Probably the issue is that _channelList is null. A better fix would be to add a check *inside* PositionGuideCursorToCurrentChannel() like so:

    Code:
    if (_channelList == null)
    {
      return;
    }

    ...or alternatively, have some logic to set the _channelList as the first channel group in this case.

    Edit: _currentChannel could also be null, so that should be checked too.

    For testing, I added

    Code:
    if (_channelList == null) return;
    if (_currentChannel == null) return;

    at the start of PositionGuideCursorToCurrentChannel

    and this now works fine when there is no channel or group specified in MediaPortal.xml, and with or without 'always hide all channels group enabled. So I think this covers all scenarios.

    Obviously this can be combined into a single line, but it is basic error checking and seems safe.

    So I guess what we need is, at the start of PositionGuideCursorToCurrentChannel

    Code:
        private void PositionGuideCursorToCurrentChannel()
        {
          _cursorX = 0;
          _cursorY = 1; // cursor should be on the program guide item
          ChannelOffset = 0;
     
          if (_channelList == null || _currentChannel == null) return;


    Could a dev ( @mm1352000 @Sebastiii ?) please make a GIT branch for this? The mantis is

    http://mantis.team-mediaportal.com/view.php?id=4114

    Thanks,

    Mark
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Will try to do that this morning :)
    Mark, can you attach your modified file ?
    Thanks.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Will try to do that this morning :)
    Mark, can you attach your modified file ?
    Thanks.

    Here it is. This one has added logging. From this, it seems that only '_currentChannel' is null, so perhaps we only need to check this.

    Note that this logic (opening EPG at last tuned channel) wasn't implemented for radio EPG, so there is nothing to do there.
     

    Attachments

    • TvGuideBase.rar
      24.2 KB
    Last edited:

    Nox71

    Portal Member
    May 5, 2005
    21
    0
    Wow there is so many replied that i didn't read them all an to update my thread i finally fix it as some says by going to channel first, select a channel and after that the connection to the TV server was just fine so it's definetly a bug with the 1.3.0 version since i think i had the same problem with the Alpha version.
     

    Dragy

    Portal Pro
    April 27, 2009
    778
    333
    31
    Home Country
    Netherlands Netherlands
    I have the same problem. I want to connect my 1.3beta client to the 1.2.3 server. Is that even possible? Anyway, I get kind of the same error as in the TS. This is my connection string: <DefaultProvider name="SQLServer" connectionString="Password=*******;Persist Security Info=True;User ID=sa;Initial Catalog=MpTvDb;Data Source=192.168.1.13\SQLEXPRESS;Connection Timeout=30;" />
     

    Attachments

    • mpsqlerror.txt
      135.3 KB
    Last edited:

    Users who are viewing this thread

    Top Bottom