mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-14 19:32:04 +01:00
- added unit tests for loading and saving TLLs of various LG models - added "Save reference list" menu item
29 lines
929 B
C#
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;
|
|
}
|
|
}
|
|
}
|