Files
ChanSort/ChanSort.Loader.Samsung/DigitalChannel.cs
hbeham 6d3826cd2e - FIX: Resizing a column caused an exception
- FIX: Deleting satellite channels from an SCM file did not work correctly
- Improved SCM file format detection
- Samsung E/F-Series: channels in the favorite lists now use their prog#  instead of all being put at #1
- fixed LG unit tests
- fixed Samsung tests
2013-06-23 23:22:09 +02:00

29 lines
920 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, bool sortedFavorites) :
base(data, sortedFavorites)
{
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;
}
}
}