mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-14 11:22:03 +01:00
- added support for Sony channel lists (read-only at the moment) - added option to disable check for updates
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
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, FavoritesIndexMode sortedFavorites, IDictionary<int, string> providerNames) :
|
|
base(data, sortedFavorites)
|
|
{
|
|
this.InitCommonData(slot, (SignalSource)((int)signalSource & ~(int)(SignalSource.TvAndRadio)), data);
|
|
|
|
if (!this.InUse || this.OldProgramNr == 0)
|
|
return;
|
|
|
|
this.InitDvbData(data, providerNames);
|
|
|
|
int transp = data.GetByte(_ChannelOrTransponder);
|
|
decimal freq = transpFreq.TryGet(transp);
|
|
if (freq == 0)
|
|
{
|
|
if ((this.SignalSource & SignalSource.Antenna) != 0)
|
|
freq = transp * 8 + 306;
|
|
else if ((this.SignalSource & SignalSource.Cable) != 0)
|
|
freq = transp * 8 + 106;
|
|
}
|
|
|
|
this.ChannelOrTransponder = transp.ToString();
|
|
this.FreqInMhz = freq;
|
|
}
|
|
}
|
|
}
|