mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-15 03:42:04 +01:00
- added experimental support for Panasonic - fixed Encrypted-flag detection for Samsung Analog and DVB-C/T channels - text editors now only open after holding the mouse button for 0.5sec - new menu item/button for deleting channels from the right list
29 lines
896 B
C#
29 lines
896 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;
|
|
|
|
this.ChannelOrTransponder = LookupData.Instance.GetDvbtChannel(freq).ToString();
|
|
this.FreqInMhz = freq;
|
|
}
|
|
}
|
|
}
|