mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-26 09:09:03 +01:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user