mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-14 19:32:04 +01:00
fixed problem with LG GlobalClone XML file writer:
no more UTF BOM, use UTF8 for encoding, specify UTF8 in XML declaration
This commit is contained in:
@@ -297,8 +297,22 @@ namespace ChanSort.Loader.GlobalClone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
doc.Save(tvOutputFile);
|
||||
|
||||
// by default .NET reformats the whole XML. These settings produce the same format as the TV xml files use
|
||||
var settings = new XmlWriterSettings();
|
||||
settings.Encoding = new UTF8Encoding(false);
|
||||
settings.Indent = true;
|
||||
settings.NewLineChars = "\r\n";
|
||||
settings.NewLineHandling = NewLineHandling.Replace;
|
||||
settings.OmitXmlDeclaration = true;
|
||||
settings.IndentChars = "";
|
||||
using (StringWriter sw = new StringWriter())
|
||||
using (XmlWriter xw = XmlWriter.Create(sw, settings))
|
||||
{
|
||||
doc.Save(xw);
|
||||
var xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n" + sw;
|
||||
File.WriteAllText(tvOutputFile, xml, settings.Encoding);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace ChanSort.Ui
|
||||
{
|
||||
public partial class MainForm : XtraForm
|
||||
{
|
||||
public const string AppVersion = "v2014-05-29";
|
||||
public const string AppVersion = "v2014-05-30";
|
||||
|
||||
private const int MaxMruEntries = 10;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Version v2014-05-29 =======================================================
|
||||
Version v2014-05-30 =======================================================
|
||||
|
||||
Changes:
|
||||
- fixed issues with LG "GlobalClone" XML file format
|
||||
- supports LG LB55xx and LB56xx xxLB*.TLL channel lists
|
||||
- supports LG LB58xx*.TLL channel lists
|
||||
(satellite channels ONLY due to lack of DVB-C/T test files)
|
||||
@@ -119,6 +120,9 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Change log ================================================================
|
||||
|
||||
2014-05-30
|
||||
- fixed issues with LG "GlobalClone" XML file format
|
||||
|
||||
2014-05-29
|
||||
- supports LG LB55xx and LB56xx xxLB*.TLL channel lists
|
||||
- supports LG LB58xx*.TLL channel lists
|
||||
|
||||
Reference in New Issue
Block a user