Files
ChanSort/ChanSort.Loader.LG/DtvChannel.cs
hbeham 7835e2ff69 - physical channel reordering for LD,LE,LX,PT,PK (except 950)
- separate DVB-C and DVB-T channel lists for LG (LA series can have both mixed in one file)
2013-06-23 00:11:16 +02:00

33 lines
1.0 KiB
C#

using ChanSort.Api;
namespace ChanSort.Loader.LG
{
public class DtvChannel : TllChannelBase
{
private const string _SignalSource = "offSignalSource";
private const string _ChannelOrTransponder = "offChannelTransponder";
private const string _FrequencyLong = "offFrequencyLong";
/*
offFavorites2 = 134
offAudioPid2 = 182
*/
public DtvChannel(int slot, DataMapping data) : base(data)
{
var signalSource = SignalSource.Digital;
signalSource |= data.GetByte(_SignalSource) == 1 ? SignalSource.Antenna : SignalSource.Cable;
this.InitCommonData(slot, signalSource, data);
this.InitDvbData(data);
int channel = data.GetByte(_ChannelOrTransponder);
this.ChannelOrTransponder = channel.ToString("d2");
// ReSharper disable PossibleLossOfFraction
this.FreqInMhz = (data.GetDword(_FrequencyLong)+10) / 1000;
// ReSharper restore PossibleLossOfFraction
if (this.FreqInMhz == 0)
this.FreqInMhz = LookupData.Instance.GetDvbtFrequenyForChannel(channel);
}
}
}