- Philips: fixed error saving the Favorite.xml file (effects Philips "ChannelMap_105" and later file format versions)

- added Hungarian translation (credits to Istvan Krisko)
- Sony XML: fixed display of wrong DVB-C cable channel/transponder number
- LG webOS 5: unfortunately no news yet, but the insight that some "CX" models run on webOS 3.6 and others on 5.1, using
  different file formats.
This commit is contained in:
Horst Beham
2020-12-05 21:55:43 +01:00
parent 2c61c28b5f
commit 6584a666c6
43 changed files with 3491 additions and 80 deletions

View File

@@ -110,6 +110,7 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources.es.resx" />
<EmbeddedResource Include="Resources.hu.resx" />
<EmbeddedResource Include="Resources.pl.resx" />
<EmbeddedResource Include="Resources.pt.resx" />
<EmbeddedResource Include="Resources.resx">

View File

@@ -14,6 +14,7 @@ namespace ChanSort.Loader.GlobalClone
{
this.SignalSource = source;
this.Index = index;
this.RecordOrder = index;
this.Node = node;
}
#endregion

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using ChanSort.Api;
@@ -13,7 +15,6 @@ namespace ChanSort.Loader.GlobalClone
string xmlPrefix;
string xmlSuffix;
private JObject doc;
private bool deletedRadioChannelsHaveMajorNumber0x4000 = false;
//private readonly ChannelList tvList = new ChannelList(SignalSource.MaskAdInput | SignalSource.Tv, "TV");
//private readonly ChannelList radioList = new ChannelList(SignalSource.MaskAdInput | SignalSource.Radio, "Radio");
@@ -124,11 +125,8 @@ namespace ChanSort.Loader.GlobalClone
int i = 0;
foreach (var node in this.doc["channelList"])
{
var ch = new GcChannel<JToken>(0, i, node);
var ch = new GcChannel<JToken>(0, i++, node);
var major = (int) node["majorNumber"];
if (major == 0x4000)
this.deletedRadioChannelsHaveMajorNumber0x4000 = true;
ch.Source = (string)node["sourceIndex"];
if (ch.Source == "SATELLITE DIGITAL")
ch.SignalSource |= SignalSource.DvbS;
@@ -243,9 +241,7 @@ namespace ChanSort.Loader.GlobalClone
}
node["deleted"] = ch.IsDeleted;
var nr = Math.Max(ch.NewProgramNr, 0); // radio channels have 0x4000 added to their number. for deleted radio channels there are files with majorNumber=0 and majorNumber=0x4000
if (nr != 0 || this.deletedRadioChannelsHaveMajorNumber0x4000)
nr |= radioMask;
var nr = Math.Max(ch.NewProgramNr, 0) | radioMask; // radio channels have 0x4000 added to the majorNumber
node["majorNumber"] = nr;
node["skipped"] = ch.Skip;
node["locked"] = ch.Lock;
@@ -259,8 +255,40 @@ namespace ChanSort.Loader.GlobalClone
//node["disableUpdate"] = true; // experimental to prevent "DTV Auto Update" of channel numbers right after importing the list
}
}
// it seems that channels must also be physically ordered by majorNumber
//var chList = this.doc["channelList"].Value<IList>();
//var copy = new ArrayList(chList);
//var comp = new ChannelOrderComparer(this.SourceIndexOrder);
//copy.Sort(comp);
//chList.Clear();
//foreach (var item in copy)
// chList.Add(item);
}
#endregion
//class ChannelOrderComparer : IComparer
//{
// private readonly IList<string> sourceIndexOrder;
// public ChannelOrderComparer(IList<string> sourceIndexOrder)
// {
// this.sourceIndexOrder = sourceIndexOrder;
// }
// public int Compare(object x, object y)
// {
// GcChannel<JToken> a = (GcChannel<JToken>)x;
// GcChannel<JToken> b = (GcChannel<JToken>)y;
// var i = sourceIndexOrder.IndexOf((string)a.Node["sourceIndex"]);
// var j = sourceIndexOrder.IndexOf((string)b.Node["sourceIndex"]);
// if (i != j)
// return i < j ? -1 : +1;
// return 0;
// }
//}
}
}

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="GcSerializer_ReadModelInfo_ModelWarning" xml:space="preserve">
<value>A tévé csak akkor importálja a GlobalClone fájlt, ha ugyanabban a könyvtárban nincsenek xx*.TLL nevű fájlok.
Szeretné, hogy a ChanSort átnevezze a problémás fájlokat?</value>
</data>
<data name="GcSerializer_webOsFirmwareWarning" xml:space="preserve">
<value>FIGYELEM:
Győződjön meg arról, hogy webOS alapú tévéje legújabb firmware verziót használ (LB600 és újabb: 4.41.32, UB: 4.51.44).
A régebbi LG firmware webOS alapú TV-modelleknél nem kezeli megfelelően a csatornák listájának importálását és véletlenszerűen rendezi át a csatornákat</value>
</data>
</root>