- Sony: Files with incorrect checksum are no longer rejected. Information about a bad checksum is visible

unter File / File Information. (The TV seems to ignore bad checksums during the import and the official
  Sony PC Editor ignores bad checksums and write incorrect ones, depending on the file format version)
- Updated Hungarian translation. Thanks to efi99 on Github!
- Minor cleanup amongst translation (setting @Invariant for constant strings and unifying "..." in menu items that open a new dialog)
This commit is contained in:
Horst Beham
2021-07-29 17:51:21 +02:00
parent 0639750095
commit d4c30a853d
27 changed files with 255 additions and 87 deletions

View File

@@ -36,6 +36,7 @@ namespace ChanSort.Loader.Sony
private string format;
private bool isEFormat;
private string newline;
private readonly StringBuilder fileInfo = new();
private readonly Dictionary<SignalSource, ChannelListNodes> channeListNodes = new Dictionary<SignalSource, ChannelListNodes>();
private ChannelList mixedFavList;
@@ -514,7 +515,7 @@ namespace ChanSort.Loader.Sony
uint crc = CalcChecksum(this.content, this.textContent);
if (crc != expectedCrc)
throw new FileLoadException($"Invalid checksum: expected 0x{expectedCrc:x8}, calculated 0x{crc:x8}");
this.fileInfo.AppendLine($"Invalid checksum: expected 0x{expectedCrc:x8}, calculated 0x{crc:x8}. This could indicate that the file is corrupted or it was modified with the Sony channel editor.");
}
#endregion
@@ -574,6 +575,13 @@ namespace ChanSort.Loader.Sony
}
#endregion
#region GetFileInformation()
public override string GetFileInformation()
{
var txt = base.GetFileInformation();
return txt + "\n\n" + this.fileInfo;
}
#endregion
#region Save()