mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-13 19:02:05 +01:00
- fixed some rare file-format detection issues for Samsung (e.g. J-series with .scm format, HExxC, LTxxC)
33 lines
1.1 KiB
C#
33 lines
1.1 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) && floatFreq > 100 && floatFreq < 2000) // some files seem to have a value way off scale
|
|
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
|
|
}
|
|
|
|
}
|