mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-14 11:22:03 +01:00
31 lines
979 B
C#
31 lines
979 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, SignalSource signalSource, DataMapping data,
|
|
IDictionary<int, decimal> transpFreq, bool sortedFavorites, IDictionary<int, string> providerNames) :
|
|
base(data, sortedFavorites)
|
|
{
|
|
this.InitCommonData(slot, (SignalSource)((int)signalSource & ~(int)(SignalSource.TvAndRadio)), data);
|
|
|
|
if (this.OldProgramNr == 0)
|
|
return;
|
|
|
|
this.InitDvbData(data, providerNames);
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|