Files
ChanSort/ChanSort.Loader.ScmFile/DigitalChannel.cs
hbeham f762230b05 - support for 2013 LA-series (DVB-S only; deactivating TV-Data File Cleanup when there are preset DVB-S channels)
- support for LH3000 (which has same record size but different layout than all other known LH models)
- added various Assistant dialogs
- icons updated
2013-05-03 19:02:30 +02:00

29 lines
929 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, bool isCable, DataMapping data,
IDictionary<int, decimal> transpFreq, int favoriteNotSetValue) :
base(data, favoriteNotSetValue)
{
var signalSource = SignalSource.Digital;
signalSource |= isCable ? SignalSource.Cable : SignalSource.Antenna;
this.InitCommonData(slot, signalSource, data);
this.InitDvbData(data);
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;
}
}
}