TV Server provides "unexpected" TV Card Number on External Channel Tuning (1 Viewer)

and-81

Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Forgive me for not including the configuration details the support template demands, but I am lodging this on behalf of another user and I believe the most relevant information is that the TV Engine is version:
    tvengine3-02-09-2007--20-13h--Rev12912.

    In the course of testing a new external channel changing plugin I am working on one of my users has found that the TV Server is supplying a strange value for the TV Card number. He has asked that I fill in the bug report due to the fact that I am more familiar with the problem.

    This is the relevant line from the TV Server log file:
    11-02-2007 11:54:07 TV3RCSuitePlugin: Card: 6, Channel: 60, MTV

    This line is put in the log by my plugin. But the "Card:" value is taken from ...

    void events_OnTvServerEvent(object sender, EventArgs eventArgs)
    {
    TvServerEventArgs tvEvent = (TvServerEventArgs)eventArgs;
    AnalogChannel analogChannel = tvEvent.channel as AnalogChannel;

    if (analogChannel == null)
    return;

    if (tvEvent.EventType == TvServerEventType.StartZapChannel)
    {
    if (LogVerbose)
    Log.Info("TV3RCSuitePlugin: Card: {0}, Channel: {1}, {2}", tvEvent.Card.Id, analogChannel.ChannelNumber, analogChannel.Name);

    ProcessExternalChannel(analogChannel.ChannelNumber.ToString(), tvEvent.Card.Id);
    }
    }

    Notice that the Card number is 6. The user only has two cards in the TV Server setup. There is no logical reason for the card to be 6.

    We have also found that once he removes the cards from the TV Server setup and puts them back in their card numbers are then 7 & 8. We were hoping they would reset to 1 & 2.

    The above code is identical to that in my TV3MceBlaster plugin and my TV3ExtChannelChanger plugin. So they would suffer from this problem too.

    The plugin assumes that if there are 2 cards in the system they will be 1 and 2. Is there any chance this could be "fixed" in the TV Server, or would I be better off detecting the card numbers in my plugin and making it able to deal with those numbers instead?
     

    Frodo

    Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,518
    121
    52
    The Netherlands
    Home Country
    Netherlands Netherlands
    the event does not give you a card number
    it gives you the cards id which can be anything.

    The plugin assumes that if there are 2 cards in the system they will be 1 and 2.
    This is a bad assumption!!

    Is there any chance this could be "fixed" in the TV Server, or would I be better off detecting the card numbers in my plugin and making it able to deal with those numbers instead?
    You should not deal with card numbers, instead you should work with the card's ids

    Frodo
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Thanks for the quick response,

    As luck would have it those ID's have until now worked as I had assumed, but if they can be anything then I'd best change my code to expect anything.

    Again, thanks for your rapid reply.

    Cheers,
     

    Users who are viewing this thread

    Top Bottom