- experimental support for Xoro HB_DATABASE_C.DBM with file size of 109720 (in case there is no checksum validation)

- LG webOS 4 GlobalClone TLL now allows to set Fav H
- Panasonic svl.bin/svl.db now also uses the ONID as 3rd criteria for joining SVL and TSL tables (caused tuplicates when there are multiple ONIDs on the same transponder)
- Fav list names can no longer be edited for file formats that don't explicitly allow it
- workaround for regression that ReferenceListForm constructur throws an error when deserializing a SuperToolTip
This commit is contained in:
Horst Beham
2023-12-18 17:03:05 +01:00
parent 1f3b9cdff6
commit 77af8ea8d0
10 changed files with 179 additions and 62 deletions

View File

@@ -108,6 +108,9 @@ namespace ChanSort.Loader.DBM
#region ValidateChecksum()
private void ValidateChecksum()
{
if (mapping.Settings.GetInt("offChecksum") < 0)
return;
var expectedChecksum = BitConverter.ToUInt16(data, 0);
var calculatedChecksum = CalcChecksum(data, sec.GetInt("offData"), (int)mapping.GetDword("offDataLength"));
if (expectedChecksum != calculatedChecksum)
@@ -263,9 +266,13 @@ namespace ChanSort.Loader.DBM
mapping.SetByte("offFavorites", fav);
}
mapping.BaseOffset = 0;
var calculatedChecksum = CalcChecksum(data, sec.GetInt("offData"), (int)mapping.GetDword("offDataLength"));
mapping.SetWord("offChecksum", calculatedChecksum);
if (mapping.Settings.GetInt("offChecksum") >= 0)
{
mapping.BaseOffset = 0;
var calculatedChecksum = CalcChecksum(data, sec.GetInt("offData"), (int)mapping.GetDword("offDataLength"));
mapping.SetWord("offChecksum", calculatedChecksum);
}
File.WriteAllBytes(this.FileName, this.data);
}
#endregion