diff --git a/ChanSort.Api/ChanSort.Api.csproj b/ChanSort.Api/ChanSort.Api.csproj
index 05552f8..bd5d3bb 100644
--- a/ChanSort.Api/ChanSort.Api.csproj
+++ b/ChanSort.Api/ChanSort.Api.csproj
@@ -90,7 +90,6 @@
-
diff --git a/ChanSort.Api/Controller/SerializerBase.cs b/ChanSort.Api/Controller/SerializerBase.cs
index 7d8ca3d..b669359 100644
--- a/ChanSort.Api/Controller/SerializerBase.cs
+++ b/ChanSort.Api/Controller/SerializerBase.cs
@@ -46,6 +46,7 @@ namespace ChanSort.Api
{
sb.Append(list.ShortCaption).AppendLine("-----");
sb.Append("number of channels: ").AppendLine(list.Count.ToString());
+ sb.Append("number of predefined channel numbers: ").AppendLine(list.PresetProgramNrCount.ToString());
sb.Append("number of duplicate program numbers: ").AppendLine(list.DuplicateProgNrCount.ToString());
sb.Append("number of duplicate channel identifiers: ").AppendLine(list.DuplicateUidCount.ToString());
int deleted = 0;
diff --git a/ChanSort.Api/Model/ChannelInfo.cs b/ChanSort.Api/Model/ChannelInfo.cs
index 1d327b6..ad4e262 100644
--- a/ChanSort.Api/Model/ChannelInfo.cs
+++ b/ChanSort.Api/Model/ChannelInfo.cs
@@ -41,6 +41,7 @@ namespace ChanSort.Api
public string SatPosition { get; set; }
public Transponder Transponder { get; set; }
public IList FavIndex { get; private set; }
+ public int ProgramNrPreset { get; set; }
public bool IsNameModified { get; set; }
diff --git a/ChanSort.Api/Model/ChannelList.cs b/ChanSort.Api/Model/ChannelList.cs
index 7cc4d0c..cb12524 100644
--- a/ChanSort.Api/Model/ChannelList.cs
+++ b/ChanSort.Api/Model/ChannelList.cs
@@ -30,6 +30,7 @@ namespace ChanSort.Api
public int DuplicateProgNrCount { get { return duplicateProgNrCount; } }
public bool ReadOnly { get; set; }
public int MaxChannelNameLength { get; set; }
+ public int PresetProgramNrCount { get; private set; }
#region Caption
public string Caption
@@ -93,6 +94,9 @@ namespace ChanSort.Api
}
byNameList.Add(ci);
+ if (ci.ProgramNrPreset != 0)
+ ++this.PresetProgramNrCount;
+
this.channels.Add(ci);
return warning2;
diff --git a/ChanSort.Api/Utils/DvbChannelMappingBase.cs b/ChanSort.Api/Utils/DvbChannelMappingBase.cs
deleted file mode 100644
index d64c1aa..0000000
--- a/ChanSort.Api/Utils/DvbChannelMappingBase.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-using System.Text;
-
-namespace ChanSort.Api
-{
- public class DvbChannelMappingBase : ChannelMappingBase
- {
- protected const string offChannelTransponder = "offChannelTransponder";
- protected const string offPcrPid = "offPcrPid";
- protected const string offVideoPid = "offVideoPid";
- protected const string offAudioPid = "offAudioPid";
- protected const string offServiceId = "offServiceId";
- protected const string offOriginalNetworkId = "offOriginalNetworkId";
- protected const string offTransportStreamId = "offTransportStreamId";
- protected const string offServiceType = "offServiceType";
- protected const string offSymbolRate = "offSymbolRate";
- protected const string offEncrypted = "offEncrypted";
- protected const string maskEncrypted = "maskEncrypted";
- protected const string offShortName = "offShortName";
- protected const string offShortNameLength = "offShortNameLength";
- protected const string lenShortName = "lenShortName";
-
-
- #region ctor()
- public DvbChannelMappingBase(IniFile.Section settings, int dataLength, Encoding stringEncoding)
- : base(settings, dataLength, stringEncoding)
- {
- }
- #endregion
-
- #region ChannelOrTransponder
- public virtual byte ChannelOrTransponder
- {
- get { return this.GetByte(offChannelTransponder); }
- set { this.SetByte(offChannelTransponder, value); }
- }
- #endregion
-
- #region ShortName
- public int ShortNameLength
- {
- get
- {
- var off = this.GetOffsets(offShortNameLength);
- if (off.Length > 0)
- return this.GetWord(off[0]);
- off = this.GetOffsets(lenShortName); // not an offset!
- return off.Length > 0 ? off[0] : 0;
- }
- }
-
- public override string ShortName { get { return this.GetString(offShortName, this.ShortNameLength); } }
- #endregion
-
- #region PcrPid
- public virtual ushort PcrPid
- {
- get { return this.GetWord(offPcrPid); }
- set { this.SetWord(offPcrPid, value); }
- }
- #endregion
-
- #region VideoPid
- public virtual ushort VideoPid
- {
- get { return this.GetWord(offVideoPid); }
- set { this.SetWord(offVideoPid, value); }
- }
- #endregion
-
- #region AudioPid
- public virtual ushort AudioPid
- {
- get { return this.GetWord(offAudioPid); }
- set { this.SetWord(offAudioPid, value); }
- }
- #endregion
-
- #region ServiceId
- public virtual ushort ServiceId
- {
- get { return this.GetWord(offServiceId); }
- set { this.SetWord(offServiceId, value); }
- }
- #endregion
-
- #region OriginalNetworkId
- public virtual ushort OriginalNetworkId
- {
- get { return this.GetWord(offOriginalNetworkId); }
- set { this.SetWord(offOriginalNetworkId, value); }
- }
- #endregion
-
- #region TransportStreamId
- public virtual ushort TransportStreamId
- {
- get { return this.GetWord(offTransportStreamId); }
- set { this.SetWord(offTransportStreamId, value); }
- }
- #endregion
-
- #region ServiceType
- public virtual byte ServiceType
- {
- get { return this.GetByte(offServiceType); }
- set { this.SetByte(offServiceType, value); }
- }
- #endregion
-
- #region SymbolRate
- public virtual ushort SymbolRate
- {
- get { return this.GetWord(offSymbolRate); }
- set { this.SetWord(offSymbolRate, value); }
- }
- #endregion
-
- #region Encrypted
- public virtual bool Encrypted
- {
- get { return this.GetFlag(offEncrypted, maskEncrypted); }
- }
- #endregion
- }
-}
diff --git a/ChanSort.Loader.LG/ChanSort.Loader.LG.ini b/ChanSort.Loader.LG/ChanSort.Loader.LG.ini
index a3d0e58..6486e57 100644
--- a/ChanSort.Loader.LG/ChanSort.Loader.LG.ini
+++ b/ChanSort.Loader.LG/ChanSort.Loader.LG.ini
@@ -8,6 +8,7 @@
offSignalSource = 8
offChannelTransponder = 10, 122, 170, 176
offProgramNr = 12, 172
+ offProgramNrPreset = 14, 174
offFavorites = 20
offPcrPid = 24, 236
offAudioPid = 26
@@ -37,6 +38,7 @@
offSignalSource = 8
offChannelTransponder = 10, 118, 153, 160
offProgramNr = 12, 156
+ offProgramNrPreset = 14, 158
offFavorites = 20
offPcrPid = 24, 208
offAudioPid = 26
@@ -66,6 +68,7 @@
offSignalSource = 8
offChannelTransponder = 10, 106, 141, 148
offProgramNr = 12, 144
+ offProgramNrPreset = 14, 146
offFavorites = 20
offPcrPid = 22, 200
offAudioPid = 24
@@ -95,6 +98,7 @@
offSignalSource = 8
offChannelTransponder = 10, 110, 141, 148
offProgramNr = 12, 144
+ offProgramNrPreset = 14, 146
offFavorites = 22
offPcrPid = 24, 196
offAudioPid = 26
@@ -124,6 +128,7 @@
offSignalSource = 8
offChannelTransponder = 10, 94, 126, 132
offProgramNr = 12, 128
+ offProgramNrPreset = 14, 130
offFavorites = 20
offPcrPid = 22, 180
offAudioPid = 24
@@ -153,6 +158,7 @@
offSignalSource = 8
offChannelTransponder = 10, 94, 125, 132
offProgramNr = 12, 128
+ offProgramNrPreset = 14, 130
offFavorites = 20
offPcrPid = 22, 180
offAudioPid = 24
@@ -182,6 +188,7 @@
offSignalSource = 8
offChannelTransponder = 10, 90, 121, 128
offProgramNr = 12, 124
+ offProgramNrPreset = 14, 126
offFavorites = 20
offPcrPid = 22, 176
offAudioPid = 24
@@ -211,6 +218,7 @@
offSignalSource = 8
offChannelTransponder = 10, 90, 124
offProgramNr = 12
+ offProgramNrPreset = 14
offFavorites = 20
offPcrPid = 22, 172
offAudioPid = 24
@@ -241,6 +249,7 @@
offSignalSource = 8
offChannelTransponder = 10, 86, 120
offProgramNr = 12
+ offProgramNrPreset = 14
offFavorites = 20
offPcrPid = 22, 168
offAudioPid = 24
@@ -265,11 +274,12 @@
offAudioPid2 = 170
[ACTChannelDataMapping:164]
- ; DM and LH series (except LH3000)
+ ; DM, LF, LH, LU (except LH3000)
reorderChannelData = 1
lenName = 40
offChannelTransponder = 9, 112
offProgramNr = 10
+ offProgramNrPreset = 12
offFavorites = 18
offPcrPid = 20, 156
offAudioPid = 22
@@ -299,6 +309,7 @@
lenName = 40
offChannelTransponder = 9, 108
offProgramNr = 10
+ offProgramNrPreset = 12
offFavorites = 18
offPcrPid = 20, 152
offAudioPid = 22
diff --git a/ChanSort.Loader.LG/PresetProgramNrDialog.Designer.cs b/ChanSort.Loader.LG/PresetProgramNrDialog.Designer.cs
index 3451a1a..cee708e 100644
--- a/ChanSort.Loader.LG/PresetProgramNrDialog.Designer.cs
+++ b/ChanSort.Loader.LG/PresetProgramNrDialog.Designer.cs
@@ -90,6 +90,7 @@
resources.ApplyResources(this.btnOk, "btnOk");
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.Name = "btnOk";
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// labelControl2
//
diff --git a/ChanSort.Loader.LG/PresetProgramNrDialog.cs b/ChanSort.Loader.LG/PresetProgramNrDialog.cs
index e1a5f0a..16fa98a 100644
--- a/ChanSort.Loader.LG/PresetProgramNrDialog.cs
+++ b/ChanSort.Loader.LG/PresetProgramNrDialog.cs
@@ -19,5 +19,11 @@ namespace ChanSort.Loader.LG
}
catch { }
}
+
+ private void btnOk_Click(object sender, System.EventArgs e)
+ {
+ if (ModifierKeys == (Keys.Alt|Keys.Control))
+ this.DialogResult = DialogResult.Yes;
+ }
}
}
diff --git a/ChanSort.Loader.LG/PresetProgramNrDialog.resx b/ChanSort.Loader.LG/PresetProgramNrDialog.resx
index 2616fb6..9aa4ff8 100644
--- a/ChanSort.Loader.LG/PresetProgramNrDialog.resx
+++ b/ChanSort.Loader.LG/PresetProgramNrDialog.resx
@@ -112,12 +112,12 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
Top, Left, Right
@@ -125,14 +125,14 @@
Vertical
-
+
10, 49
560, 26
-
+
0
@@ -326,7 +326,7 @@
linkDetails
- System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
$this
@@ -391,7 +391,7 @@
0
-
+
True
diff --git a/ChanSort.Loader.LG/SatChannel.cs b/ChanSort.Loader.LG/SatChannel.cs
index c4f94ed..953530c 100644
--- a/ChanSort.Loader.LG/SatChannel.cs
+++ b/ChanSort.Loader.LG/SatChannel.cs
@@ -6,10 +6,8 @@ namespace ChanSort.Loader.LG
{
private const string _SatConfigIndex = "offSatelliteNr";
private const string _TransponderIndex = "offTransponderIndex";
- private const string _ProgramNrPreset = "offProgramNrPreset";
public bool InUse { get; private set; }
- public int ProgramNrPreset { get; private set; }
public SatChannel(int order, int slot, DataMapping data, DataRoot dataRoot) : base(data)
{
@@ -20,7 +18,6 @@ namespace ChanSort.Loader.LG
this.InitCommonData(slot, SignalSource.DvbS, data);
this.InitDvbData(data);
- this.ProgramNrPreset = data.GetWord(_ProgramNrPreset);
int transponderIndex = data.GetWord(_TransponderIndex);
Transponder transponder = dataRoot.Transponder.TryGet(transponderIndex);
Satellite sat = transponder.Satellite;
diff --git a/ChanSort.Loader.LG/TllChannelBase.cs b/ChanSort.Loader.LG/TllChannelBase.cs
index 59731e8..333ff13 100644
--- a/ChanSort.Loader.LG/TllChannelBase.cs
+++ b/ChanSort.Loader.LG/TllChannelBase.cs
@@ -7,6 +7,7 @@ namespace ChanSort.Loader.LG
// common
protected const string _ProgramNr = "offProgramNr";
protected const string _ProgramNr2 = "offProgramNr2"; // not for DVB-S
+ protected const string _ProgramNrPreset = "offProgramNrPreset";
protected const string _Name = "offName";
protected const string _NameLength = "offNameLength";
protected const string _Favorites = "offFavorites"; // not for DVB-S (which only uses Favorite2)
@@ -68,6 +69,7 @@ namespace ChanSort.Loader.LG
this.OriginalNetworkId = data.GetWord(_OriginalNetworkId);
this.TransportStreamId = data.GetWord(_TransportStreamId);
this.ServiceType = data.GetByte(_ServiceType);
+ this.ProgramNrPreset = data.GetWord(_ProgramNrPreset);
}
#endregion
@@ -91,6 +93,7 @@ namespace ChanSort.Loader.LG
int progNr = this.NewProgramNr == -1 ? 0 : this.NewProgramNr;
mapping.SetWord(_ProgramNr, progNr | ((this.SignalSource & SignalSource.Radio) != 0 ? 0x4000 : 0));
mapping.SetWord(_ProgramNr2, (mapping.GetWord(_ProgramNr2) & 0x0003) | (progNr << 2));
+ mapping.SetWord(_ProgramNrPreset, 0);
if (this.IsNameModified)
{
mapping.SetString(_Name, this.Name, 40);
@@ -105,10 +108,12 @@ namespace ChanSort.Loader.LG
if (this.NewProgramNr == -1)
{
mapping.SetFlag(_Deleted, true);
- mapping.SetByte("off"+_Moved, 0); //skip,lock,hide,moved
+ mapping.SetByte("off" + _Moved, 0); //skip,lock,hide,moved
}
else
+ {
mapping.SetFlag(_Moved, true);
+ }
this.OldProgramNr = this.NewProgramNr;
}
diff --git a/ChanSort.Loader.LG/TllFileSerializer.cs b/ChanSort.Loader.LG/TllFileSerializer.cs
index 3eb8f83..8512fbc 100644
--- a/ChanSort.Loader.LG/TllFileSerializer.cs
+++ b/ChanSort.Loader.LG/TllFileSerializer.cs
@@ -67,7 +67,6 @@ namespace ChanSort.Loader.LG
private int deletedChannelsHard;
private int deletedChannelsSoft;
private int dvbsChannelsAtPr0;
- private int presetChannels;
private bool removeDeletedActChannels = false;
private bool mustReorganizeDvbs = false;
@@ -161,16 +160,17 @@ namespace ChanSort.Loader.LG
this.ReadDvbSBlock(ref off);
this.ReadSettingsBlock(ref off);
- if (this.presetChannels > 0)
+ if (this.satTvChannels.PresetProgramNrCount > 0 || this.satRadioChannels.PresetProgramNrCount > 0)
{
- this.satTvChannels.ReadOnly = true;
- this.satRadioChannels.ReadOnly = true;
foreach (var channel in this.satTvChannels.Channels)
channel.NewProgramNr = channel.OldProgramNr;
foreach (var channel in this.satRadioChannels.Channels)
channel.NewProgramNr = channel.OldProgramNr;
- if (!IsTesting)
- new PresetProgramNrDialog().ShowDialog();
+ if (IsTesting || new PresetProgramNrDialog().ShowDialog() != DialogResult.Yes)
+ {
+ this.satTvChannels.ReadOnly = true;
+ this.satRadioChannels.ReadOnly = true;
+ }
}
#if STORE_DVBS_CHANNELS_IN_DATABASE
@@ -540,9 +540,6 @@ namespace ChanSort.Loader.LG
++this.duplicateChannels;
}
this.DataRoot.AddChannel(list, ci);
-
- if (ci.ProgramNrPreset != 0)
- ++this.presetChannels;
}
if (!this.nextChannelIndex.TryGetValue(index, out index) || index == -1)
@@ -941,6 +938,7 @@ namespace ChanSort.Loader.LG
#endregion
+ #region CreateChannelFromProxy()
private ChannelInfo CreateChannelFromProxy(ChannelInfo proxy)
{
if ((proxy.SignalSource & SignalSource.Sat) != 0)
@@ -953,6 +951,7 @@ namespace ChanSort.Loader.LG
}
return null;
}
+ #endregion
#region ReorderActChannelsPhysically()
private void ReorderActChannelsPhysically()
@@ -1047,6 +1046,8 @@ namespace ChanSort.Loader.LG
public override string GetFileInformation()
{
StringBuilder sb = new StringBuilder();
+ sb.AppendLine(base.GetFileInformation());
+
sb.AppendLine("ANALOG");
sb.Append("Number of data records: ").Append(this.analogChannelCount).AppendLine();
sb.Append("Length of data record: ").Append(this.actChannelSize).AppendLine();
@@ -1072,7 +1073,6 @@ namespace ChanSort.Loader.LG
sb.Append("Channel records erased (duplicates): ").Append(this.duplicateChannels).AppendLine();
sb.Append("Channel records with Pr# 0: ").Append(dvbsChannelsAtPr0).AppendLine();
sb.Append("Channel records with duplicate Pr#: ").Append(numberOfDupePrNr).AppendLine();
- sb.Append("Channel records with preset Pr#: ").Append(this.presetChannels).AppendLine();
}
else
sb.AppendLine("not present");
@@ -1156,6 +1156,5 @@ namespace ChanSort.Loader.LG
internal int SatChannelLength { get { return satConfig != null ? satConfig.dvbsChannelLength : 0; } }
internal decimal DvbsSymbolRateCorrectionFactor { get { return this.dvbsSymbolRateFactor; } }
internal int FirmwareBlockSize { get { return this.firmwareBlockSize; } }
- internal bool HasPresetDvbsChannelNumbers { get { return this.presetChannels > 0; } }
}
}
diff --git a/ChanSort.Loader.Samsung/ScmChannelBase.cs b/ChanSort.Loader.Samsung/ScmChannelBase.cs
index 07a86da..2145381 100644
--- a/ChanSort.Loader.Samsung/ScmChannelBase.cs
+++ b/ChanSort.Loader.Samsung/ScmChannelBase.cs
@@ -58,6 +58,8 @@ namespace ChanSort.Loader.Samsung
this.Lock = data.GetFlag(_Lock);
this.Encrypted = data.GetFlag(_Encrypted);
this.IsDeleted = data.GetFlag(_Deleted);
+ if (this.IsDeleted)
+ this.OldProgramNr = -1;
}
#endregion
diff --git a/ChanSort.Loader.Samsung/ScmSerializer.cs b/ChanSort.Loader.Samsung/ScmSerializer.cs
index 86e7056..700250c 100644
--- a/ChanSort.Loader.Samsung/ScmSerializer.cs
+++ b/ChanSort.Loader.Samsung/ScmSerializer.cs
@@ -401,7 +401,7 @@ namespace ChanSort.Loader.Samsung
for (int slotIndex = 0; slotIndex < count; slotIndex++)
{
DigitalChannel ci = new DigitalChannel(slotIndex, isCable, rawChannel, frequency, c.SortedFavorites);
- if (ci.InUse && !ci.IsDeleted)
+ if (ci.InUse && !ci.IsDeleted && ci.OldProgramNr > 0)
this.DataRoot.AddChannel(list, ci);
rawChannel.BaseOffset += entrySize;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/chansort.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/chansort.h
index 593c4bb..8e30a9c 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/chansort.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/chansort.h
@@ -2,3 +2,13 @@ typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned int dword;
typedef big_endian unsigned short uc16be;
+
+enum ServiceType : byte
+{
+ SDTV = 1,
+ Radio = 2,
+ Data = 12,
+ SDTV_MPEG4 = 22,
+ HDTV = 25,
+ Option = 211
+};
\ No newline at end of file
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH3000.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH3000.h
index a2f2022..12b15a9 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH3000.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH3000.h
@@ -8,7 +8,8 @@ struct LH3000_AnalogChannel
byte t1b[6];
byte ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2d;
word Freqency1Div50;
@@ -20,23 +21,23 @@ struct LH3000_AnalogChannel
byte CH_NameLength1;
byte t4;
word SID1;
- byte t5a[14]; // !
+ byte t5a[14];
word ONID;
word TSID;
- byte t5b[6];
- dword Frequency;
- byte t6[8];
- word ProgramNr2;
- byte t7[2];
+ byte t5b[14];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
byte ChannelTransponder4;
byte _Favorites2;
byte LockSkipHide;
- byte ServiceType;
+ byte CH_NameLength2;
char CH_Name2[40];
word Frequency2Div50;
word APID2;
word t11;
word t12;
+ ServiceType ServiceType;
+ byte t13[3];
};
@@ -47,7 +48,7 @@ struct LH3000_DvbCtChannel
byte t1b[6];
byte ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr1;
word t2[2];
byte Favorites1;
byte t2d;
@@ -62,7 +63,9 @@ struct LH3000_DvbCtChannel
byte t5a[14];
word ONID;
word TSID;
- byte t5b[18];
+ byte t5b[14];
+ word ProgramNrTimes4;
+ word LocicalProgramNr2;
byte ChannelTransponder4;
byte _Favorites2;
byte LockSkipHide;
@@ -72,7 +75,8 @@ struct LH3000_DvbCtChannel
word APID2;
word t11;
word SID2;
- byte t13[4];
+ ServiceType ServiceType;
+ byte t13[3];
};
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH_LU_LF.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH_LU_LF.h
index 7b3205c..d1e0752 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH_LU_LF.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-164_LH_LU_LF.h
@@ -7,7 +7,7 @@ struct LH164_AnalogChannel
byte t1b[6];
byte ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
byte Favorites1;
byte t2d;
word Freqency1Div50;
@@ -25,8 +25,8 @@ struct LH164_AnalogChannel
byte t5b[6];
dword Frequency;
byte t6[8];
- word ProgramNr2;
- byte t7[2];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
byte ChannelTransponder4;
byte _Favorites2;
byte LockSkipHide;
@@ -46,7 +46,7 @@ struct LH164_DvbCtChannel
byte t1b[6];
byte ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr2;
word t2[2];
byte Favorites1;
byte t2d;
@@ -64,8 +64,8 @@ struct LH164_DvbCtChannel
byte t5b[6];
dword Frequency;
byte t6[8];
- word ProgramNr2;
- byte t7[2];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
byte ChannelTransponder4;
byte _Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-176-LD_LE_LK.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-176-LD_LE_LK_LX_LW45_LW54.h
similarity index 90%
rename from Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-176-LD_LE_LK.h
rename to Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-176-LD_LE_LK_LX_LW45_LW54.h
index df45f90..c6f7388 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-176-LD_LE_LK.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-176-LD_LE_LK_LX_LW45_LW54.h
@@ -7,7 +7,8 @@ struct LD176_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2d;
word Freqency1Div50;
@@ -26,9 +27,9 @@ struct LD176_AnalogChannel
byte t6[2];
word ONID;
word TSID;
- byte t7[19];
- word ProgramNr2;
- byte t8;
+ byte t7[18];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
@@ -48,7 +49,8 @@ struct LD176_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2d;
word PcrPid;
@@ -66,8 +68,8 @@ struct LD176_DvbCtChannel
word ONID;
word TSID;
byte t7[18];
- word ProgramNr2;
- byte t8[2];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-180-PT.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-180-PT.h
index 8cfe1c5..d1bd1f7 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-180-PT.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-180-PT.h
@@ -7,7 +7,8 @@ struct PT180_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2b;
word Frequency1Div50;
@@ -26,8 +27,8 @@ struct PT180_AnalogChannel
word ONID;
word TSID;
byte t7[18];
- word ProgramNr2;
- byte t8[2];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
@@ -48,7 +49,7 @@ struct PT180_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr2;
word t2[2];
byte Favorites1;
byte t2d;
@@ -67,8 +68,8 @@ struct PT180_DvbCtChannel
word ONID;
word TSID;
byte t7[18];
- word ProgramNr2;
- byte t8[2];
+ word ProgramNrTimes4;
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-184-LV_LW_LK950S.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-184-LV_LW_LK950S.h
index 10b95b2..1c48c2f 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-184-LV_LW_LK950S.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-184-LV_LW_LK950S.h
@@ -12,7 +12,8 @@ struct LV184_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2b;
word Frequency1Div50;
@@ -33,7 +34,8 @@ struct LV184_AnalogChannel
byte t7[19];
word ChannelTransponder3;
word ProgramNr2;
- byte t8b[3];
+ word LogicalProgramNr2;
+ byte t8b;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
@@ -54,7 +56,7 @@ struct LV184_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr2;
word t2[2];
byte Favorites1;
byte t2d;
@@ -75,7 +77,8 @@ struct LV184_DvbCtChannel
byte t7[19];
word ChannelTransponder3;
word ProgramNr2;
- byte t8b[3];
+ word LogicalProgramNr2;
+ byte t8b;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-188-LM611S.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-188-LM611S.h
index eb73b2c..2a8603d 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-188-LM611S.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-188-LM611S.h
@@ -14,7 +14,8 @@ struct LM188_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte t2b;
byte Favorites1;
word Frequency1Div50;
@@ -36,7 +37,7 @@ struct LM188_AnalogChannel
byte t7[17];
word ChannelTransponder3;
word ProgramNr2;
- byte t8b[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
@@ -56,7 +57,7 @@ struct LM188_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr1;
word t2[2];
byte t2b;
byte Favorites1;
@@ -80,7 +81,7 @@ struct LM188_DvbCtChannel
word ChannelTransponder3;
byte t8a;
word ProgramNr2;
- byte t8b[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-192-LM_LS.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-192-LM_LS.h
index 609311d..521262f 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-192-LM_LS.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-192-LM_LS.h
@@ -18,6 +18,8 @@ typedef TLL72_SatChannel TLL_SatChannel;
struct TLL44_Lnb;
typedef TLL44_Lnb TLL_Lnb;
+#define DVBS_CHANNELLIST_PREFIXSIZE 0
+
#include "tll-satellite.h"
@@ -115,7 +117,7 @@ struct LM192_DvbCtChannel
byte t7[20];
word ChannelTransponder3;
word ProgramNr2;
- byte t8b[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-LT.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-LT.h
index e784731..7ac3a85 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-LT.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-LT.h
@@ -7,7 +7,8 @@ struct LT212_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2d;
word Frequency1Div50;
@@ -29,7 +30,7 @@ struct LT212_AnalogChannel
word ChannelTransponder3;
byte t7b;
word ProgramNr2;
- byte t8[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte t8b[4];
byte Favorites2;
@@ -97,7 +98,7 @@ struct LT212_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNr;
+ word LogicalChannelNr1;
word t2[2];
byte Favorites1;
byte t2d;
@@ -120,7 +121,7 @@ struct LT212_DvbCtChannel
word ChannelTransponder3;
byte t7b;
word ProgramNr2;
- byte t8[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte t8b[4];
byte Favorites2;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-PN.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-PN.h
index 39db4f1..e6b0ef8 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-PN.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-212-PN.h
@@ -27,7 +27,8 @@ struct PN212_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2d;
word Frequency1Div50;
@@ -49,7 +50,7 @@ struct PN212_AnalogChannel
word ChannelTransponder3;
byte t7b;
word ProgramNr2;
- byte t8[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte t8b[4];
byte Favorites2;
@@ -119,7 +120,7 @@ struct PN212_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNr;
+ word LogicalProgramNr1;
byte t2[6];
byte Favorites1;
byte t2d;
@@ -145,7 +146,7 @@ struct PN212_DvbCtChannel
word ChannelTransponder3;
byte t7b;
word ProgramNr2;
- word LogicalChannelNr2;
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte t8b[0];
byte Favorites2;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-224-LN.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-224-LN.h
index 6fb0304..3890fd9 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-224-LN.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-224-LN.h
@@ -12,7 +12,8 @@ struct LN224_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word t2[3];
+ word LogicalProgramNr1;
+ word t2[2];
byte Favorites1;
byte t2d;
word Frequency1Div50;
@@ -33,7 +34,7 @@ struct LN224_AnalogChannel
byte t7[20];
word ChannelTransponder3;
word ProgramNr2;
- byte t8b[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
@@ -96,7 +97,7 @@ struct LN224_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr1;
word t2[2];
byte Favorites1;
byte t2b[3];
@@ -119,7 +120,7 @@ struct LN224_DvbCtChannel
word ChannelTransponder3;
byte t7b;
word ProgramNr2;
- byte t8b[2];
+ word LogicalProgramNr2;
word ChannelTransponder4;
byte Favorites2;
byte LockSkipHide;
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-256-LA.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-256-LA.h
index 616e131..697d663 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-256-LA.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-256-LA.h
@@ -25,7 +25,7 @@ struct LA256_AnalogChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalProgramNr;
+ word LogicalProgramNr1;
byte t2[4];
byte Favorites1;
byte t2b[3];
@@ -115,7 +115,7 @@ struct LA256_DvbCtChannel
byte t1b;
word ChannelTransponder1;
word ProgramNr;
- word LogicalChannelNumber;
+ word LogicalProgramNr1;
byte t2a[4];
byte Fav1;
byte t2b[3];
diff --git a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-common.h b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-common.h
index fb56652..73d3a16 100644
--- a/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-common.h
+++ b/Information/FileStructures_for_HHD_Hex_Editor_Neo/tll-common.h
@@ -1,6 +1,4 @@
-typedef unsigned char byte;
-typedef unsigned short word;
-typedef unsigned int dword;
+#include "chansort.h"
struct TLL_HotelSettings
{
diff --git a/Information/LG+Samsung Model Info.xlsx b/Information/LG+Samsung Model Info.xlsx
index ca3c07c..93e8b3d 100644
Binary files a/Information/LG+Samsung Model Info.xlsx and b/Information/LG+Samsung Model Info.xlsx differ
diff --git a/Test.Loader/LgTest.cs b/Test.Loader/LgTest.cs
index 17de06c..c1a4003 100644
--- a/Test.Loader/LgTest.cs
+++ b/Test.Loader/LgTest.cs
@@ -50,7 +50,9 @@ namespace Test.Loader
"\t" + (dvbcList != null && dvbcList.Count > 0) +
"\t" + serializer.SatChannelLength +
"\t" + (satChannelList != null && satChannelList.Count > 0) +
- "\t" + serializer.HasPresetDvbsChannelNumbers +
+ "\t" + (dvbtList != null && dvbtList.PresetProgramNrCount > 0) +
+ "\t" + (dvbcList != null && dvbcList.PresetProgramNrCount > 0) +
+ "\t" + (satChannelList != null && satChannelList.PresetProgramNrCount > 0) +
"\t" + serializer.TvCountryCode;
string relPath = Path.GetFileName(Path.GetDirectoryName(file))+"\\"+fileName;
@@ -61,7 +63,9 @@ namespace Test.Loader
"\t" + (dvbtList == null ? 0 : dvbtList.Count) +
"\t" + (dvbcList == null ? 0 : dvbcList.Count) +
"\t" + (satChannelList == null ? 0 : satChannelList.Count) +
- "\t" + serializer.HasPresetDvbsChannelNumbers +
+ "\t" + (dvbtList == null ? 0 : dvbtList.PresetProgramNrCount) +
+ "\t" + (dvbcList == null ? 0 : dvbcList.PresetProgramNrCount) +
+ "\t" + (satChannelList == null ? 0 : satChannelList.PresetProgramNrCount) +
"\t" + serializer.TvCountryCode +
"\t" + serializer.DvbsSymbolRateCorrectionFactor +
"\t" + relPath;