2013-04-03 12:47:24 +02:00
|
|
|
|
using ChanSort.Api;
|
|
|
|
|
|
|
2013-04-21 22:04:06 +02:00
|
|
|
|
namespace ChanSort.Loader.LG
|
2013-04-03 12:47:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
public class DtvChannel : TllChannelBase
|
|
|
|
|
|
{
|
2013-06-23 00:11:16 +02:00
|
|
|
|
private const string _SignalSource = "offSignalSource";
|
2013-04-03 12:47:24 +02:00
|
|
|
|
private const string _ChannelOrTransponder = "offChannelTransponder";
|
|
|
|
|
|
private const string _FrequencyLong = "offFrequencyLong";
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
offFavorites2 = 134
|
|
|
|
|
|
offAudioPid2 = 182
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public DtvChannel(int slot, DataMapping data) : base(data)
|
|
|
|
|
|
{
|
2013-06-23 00:11:16 +02:00
|
|
|
|
var signalSource = SignalSource.Digital;
|
|
|
|
|
|
signalSource |= data.GetByte(_SignalSource) == 1 ? SignalSource.Antenna : SignalSource.Cable;
|
|
|
|
|
|
this.InitCommonData(slot, signalSource, data);
|
2013-04-03 12:47:24 +02:00
|
|
|
|
this.InitDvbData(data);
|
|
|
|
|
|
|
2013-05-03 19:02:30 +02:00
|
|
|
|
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)
|
2015-06-05 06:08:40 +02:00
|
|
|
|
this.FreqInMhz = LookupData.Instance.GetDvbtFrequeny(channel);
|
2013-04-03 12:47:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|