Files
ChanSort/ChanSort.Loader.Samsung/DigitalChannel.cs
hbeham 62d7d647ae - physically remove channel data from LG's LD/LE/LH series files (which require physical reordering of channels)
- fixed handling of favorite channel indices for Samsung F and H series
2014-11-04 11:15:34 +01:00

31 lines
1002 B
C#

using System.Collections.Generic;
using ChanSort.Api;
namespace ChanSort.Loader.Samsung
{
public class DigitalChannel : ScmChannelBase
{
private const string _ChannelOrTransponder = "offChannelTransponder";
public DigitalChannel(int slot, SignalSource signalSource, DataMapping data,
IDictionary<int, decimal> transpFreq, FavoritesIndexMode sortedFavorites, IDictionary<int, string> providerNames) :
base(data, sortedFavorites)
{
this.InitCommonData(slot, (SignalSource)((int)signalSource & ~(int)(SignalSource.TvAndRadio)), data);
if (!this.InUse || this.OldProgramNr == 0)
return;
this.InitDvbData(data, providerNames);
int transp = data.GetByte(_ChannelOrTransponder);
decimal freq = transpFreq.TryGet(transp);
if (freq == 0)
freq = transp*8 + 106; // (106 = DVB-C; DVB-T=306?)
this.ChannelOrTransponder = LookupData.Instance.GetDvbtTransponder(freq).ToString();
this.FreqInMhz = freq;
}
}
}