Files
ChanSort/ChanSort.Loader.Samsung/AnalogChannel.cs
hbeham 62d7d647ae - physically remove channel data from LG's LD/LE/LH series files (which require physical reordering of channels)
- fixed handling of favorite channel indices for Samsung F and H series
2014-11-04 11:15:34 +01:00

32 lines
1.0 KiB
C#

using ChanSort.Api;
namespace ChanSort.Loader.Samsung
{
internal class AnalogChannel : ScmChannelBase
{
private const string _Frequency = "offFrequency";
#region ctor()
public AnalogChannel(int slot, bool isCable, DataMapping mapping, decimal freq, FavoritesIndexMode sortedFavorites) :
base(mapping, sortedFavorites)
{
var signalSource = SignalSource.Analog | SignalSource.Tv;
signalSource |= isCable ? SignalSource.Cable : SignalSource.Antenna;
this.InitCommonData(slot, signalSource, mapping);
var floatFreq = mapping.GetFloat(_Frequency);
if (!float.IsNaN(floatFreq))
this.FreqInMhz = (decimal)floatFreq; // C,D,E series have the value in the data record
if (this.FreqInMhz == 0) // for B series take it from the Tuning table
this.FreqInMhz = freq;
if (this.FreqInMhz == 0) // fallback since Freq is part of the UID and requires a unique value
this.FreqInMhz = slot;
this.ChannelOrTransponder = "";
}
#endregion
}
}