Small contribution to fix tuningdetails view. (1 Viewer)

te3hpurp

Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi all.

    Current implementation of showing tuning details probably works most users
    if they have combined channels from same network. Well i have combined channels from
    dvb-t & dvb-s, Like Yle1 in finland. It is aired in dvb-t and in dvb-s(from canal digital).

    If try to view tuningdetails, returned information is always from dvb-s, this happens in
    TvPlugin in file TVTuningDetails.cs. Detail info is always returned from the position 0 in tunidetails array.

    Instead of returning details like this:

    Code:
    TuningDetail detail = details[0];

    like original code does, it should compare channelltype and
    currently used cardtype to find out which info to use, like this:

    Code:
            IList<TuningDetail> details = chan.ReferringTuningDetail();
            if (details.Count > 0)
            TuningDetail detail=null;
            foreach (TuningDetail detaile in details)
            { 
            switch (detaile.ChannelType)
             {
              case 0: //AnalogChannel
                  if (TVHome.Card.Type == TvLibrary.Interfaces.CardType.Analog)
                      detail = detaile;
                     break;
              case 1: //ATSCChannel
                  if (TVHome.Card.Type == TvLibrary.Interfaces.CardType.Atsc)
                      detail = detaile;
                     break;
              case 2: //DVBCChannel
                  if (TVHome.Card.Type == TvLibrary.Interfaces.CardType.DvbC)
                      detail = detaile;
                  break;
              case 3: //DVBSChannel
                  if (TVHome.Card.Type == TvLibrary.Interfaces.CardType.DvbS)
                      detail = detaile;
                  break;
              case 4: //DVBTChannel
                  if (TVHome.Card.Type == TvLibrary.Interfaces.CardType.DvbT)
                      detail = detaile;
                  break;
            }
          }

    Included patch should not break operation when combined channels are from same provider and network.

    regards,
     

    Attachments

    • TuningDetails.patch
      30.6 KB

    Users who are viewing this thread

    Top Bottom