mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-02-26 16:20:43 +01:00
- fixed "Export to Excel" (copies the list as tab-separated text into clipboard)
- included latest translation to Polish (thanks to J.D.) - reorganized File menu and tool bar - allow renaming channels in SatcoDX channel lists (\*.sdx) - improved support for Panasonic LS 500 / LX 700 series
This commit is contained in:
@@ -92,7 +92,8 @@ namespace ChanSort.Api
|
||||
this.channelByProgNr.TryGetValue(ci.OldProgramNr, out other);
|
||||
if (other != null)
|
||||
{
|
||||
warning2 = string.Format(Resources.ChannelList_ProgramNrAssignedToMultipleChannels,
|
||||
var format = Resources.ChannelList_ProgramNrAssignedToMultipleChannels.Replace("{1}", "{1,5}");
|
||||
warning2 = string.Format(format,
|
||||
this.ShortCaption, ci.OldProgramNr, other.RecordIndex, other.Name, ci.RecordIndex, ci.Name);
|
||||
++duplicateProgNrCount;
|
||||
isDupeProgNr = true;
|
||||
|
||||
@@ -1,45 +1,83 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ChanSort.Api
|
||||
namespace ChanSort.Api;
|
||||
|
||||
public static class CsvFile
|
||||
{
|
||||
public static class CsvFile
|
||||
public static IList<string> Parse(string line, char separator)
|
||||
{
|
||||
public static IList<string> Parse(string line, char separator)
|
||||
{
|
||||
if (line.EndsWith("\n")) line = line.Substring(0, line.Length - 1);
|
||||
if (line.EndsWith("\r")) line = line.Substring(0, line.Length - 1);
|
||||
if (line.EndsWith("\n")) line = line.Substring(0, line.Length - 1);
|
||||
if (line.EndsWith("\r")) line = line.Substring(0, line.Length - 1);
|
||||
|
||||
List<string> tokens = new List<string>();
|
||||
if (line.Length == 0)
|
||||
return tokens;
|
||||
|
||||
bool inQuote = false;
|
||||
StringBuilder token = new StringBuilder();
|
||||
for(int i = 0, len=line.Length; i<len; i++)
|
||||
{
|
||||
char ch = line[i];
|
||||
if (ch == separator && !inQuote)
|
||||
{
|
||||
tokens.Add(token.ToString());
|
||||
token.Remove(0, token.Length);
|
||||
continue;
|
||||
}
|
||||
if (ch == '"')
|
||||
{
|
||||
if (inQuote && i+1 < len && line[i+1] == '"')
|
||||
{
|
||||
token.Append('"');
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
inQuote = !inQuote;
|
||||
continue;
|
||||
}
|
||||
token.Append(ch);
|
||||
}
|
||||
tokens.Add(token.ToString());
|
||||
List<string> tokens = new List<string>();
|
||||
if (line.Length == 0)
|
||||
return tokens;
|
||||
|
||||
bool inQuote = false;
|
||||
StringBuilder token = new StringBuilder();
|
||||
for(int i = 0, len=line.Length; i<len; i++)
|
||||
{
|
||||
char ch = line[i];
|
||||
if (ch == separator && !inQuote)
|
||||
{
|
||||
tokens.Add(token.ToString());
|
||||
token.Remove(0, token.Length);
|
||||
continue;
|
||||
}
|
||||
if (ch == '"')
|
||||
{
|
||||
if (inQuote && i+1 < len && line[i+1] == '"')
|
||||
{
|
||||
token.Append('"');
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
inQuote = !inQuote;
|
||||
continue;
|
||||
}
|
||||
token.Append(ch);
|
||||
}
|
||||
tokens.Add(token.ToString());
|
||||
return tokens;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ToValue(object obj, bool needQuotes = false)
|
||||
{
|
||||
if (obj == null)
|
||||
return "";
|
||||
|
||||
var text = obj.ToString();
|
||||
|
||||
var sb = new StringBuilder();
|
||||
foreach (var c in text)
|
||||
{
|
||||
if (c == '\0' || c == '\x1D') // skip end-of-string and end-of-file
|
||||
continue;
|
||||
if (c == '\"') // double the double-quote
|
||||
sb.Append('"');
|
||||
if (!needQuotes && "\",;\n\r\t".IndexOf(c) >= 0) // characters that require the value to be quoted
|
||||
needQuotes = true;
|
||||
sb.Append(c);
|
||||
}
|
||||
if (needQuotes)
|
||||
sb.Insert(0, "\"").Append("\"");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string ToLine(IEnumerable<object> values, char separator, bool needQuotes = false)
|
||||
{
|
||||
if (values == null)
|
||||
return "";
|
||||
var sb = new StringBuilder();
|
||||
foreach (var value in values)
|
||||
{
|
||||
if (sb.Length > 0)
|
||||
sb.Append(separator);
|
||||
sb.Append(ToValue(value, needQuotes));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
2
source/ChanSort.Loader.LG/Resource.Designer.cs
generated
2
source/ChanSort.Loader.LG/Resource.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace ChanSort.Loader.LG {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resource {
|
||||
|
||||
@@ -153,7 +153,7 @@ Starsze oprogramowanie LG dla modeli telewizorów opartych na webOS nie obsługu
|
||||
|
||||
Listy kanałów LG można zaimportować z powrotem do telewizora TYLKO, jeśli podczas wyszukiwania kanałów w telewizorze wybrano specjalne opcje:
|
||||
- Dostawca: MUSI być żaden/inny (NIE wybieraj dostawcy telewizji kablowej ani Astry 19.2E)
|
||||
- Blindscan: MUSI być wybrany
|
||||
- Wyszukiwanie na ślepo: MUSI być wybrany
|
||||
- Wyszukiwanie sieci: opcjonalne (można wybrać)
|
||||
|
||||
Telewizor nie przetworzy listy poprawnie, jeśli te kroki nie zostaną wykonane!</value>
|
||||
|
||||
@@ -366,8 +366,10 @@ class Serializer : SerializerBase
|
||||
{
|
||||
var a = e.Attributes;
|
||||
var listId = int.Parse(a["FavoriteId"].InnerText);
|
||||
var serviceId = int.Parse(a["ServiceId"].InnerText);
|
||||
var lcn = int.Parse(a["Lcn"].InnerText);
|
||||
if (!int.TryParse(a["ServiceId"].InnerText, out var serviceId))
|
||||
return;
|
||||
if (!int.TryParse(a["Lcn"].InnerText, out var lcn))
|
||||
return;
|
||||
|
||||
if (!this.channelsById.TryGetValue(serviceId, out var c))
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,9 @@ namespace ChanSort.Loader.Panasonic
|
||||
internal bool NonAscii;
|
||||
internal bool ValidUtf8 = true;
|
||||
|
||||
#region ctor()
|
||||
internal int InternalProviderFlag2;
|
||||
|
||||
#region ctor(IDataReader, ...)
|
||||
internal DbChannel(IDataReader r, IDictionary<string, int> field, DataRoot dataRoot, Encoding encoding)
|
||||
{
|
||||
this.RecordIndex = r.GetInt32(field["rowid"]);
|
||||
@@ -61,6 +63,12 @@ namespace ChanSort.Loader.Panasonic
|
||||
|
||||
#endregion
|
||||
|
||||
#region ctor(SignalSource, ...)
|
||||
public DbChannel(SignalSource signalSource, long id, int progNr, string name) : base(signalSource, id, progNr, name)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ParseFavorites
|
||||
private void ParseFavorites(IDataReader r, IDictionary<string, int> field)
|
||||
{
|
||||
|
||||
@@ -1,21 +1,52 @@
|
||||
using System;
|
||||
//#define DUMP
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using ChanSort.Api;
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
namespace ChanSort.Loader.Panasonic;
|
||||
|
||||
/*
|
||||
* Serializer for the 2022 Android based Panasonic LS 500, LX 700, ... series file format
|
||||
* Serializer for the 2022/2023 Android based Panasonic LS 500, LX 700 series file format
|
||||
*
|
||||
* The format uses a directory tree with
|
||||
* /hotel.bin (irrelevant content)
|
||||
* /mnt/vendor/tvdata/database/tv.db Sqlite database (probably for the menu, EPG, ...)
|
||||
* /mnt/vendor/tvdata/database/channel/idtvChannel.bin (probably for the tuner)
|
||||
* /mnt/vendor/tvdata/database/tv.db Sqlite database
|
||||
* /mnt/vendor/tvdata/database/channel/idtvChannel.bin
|
||||
*
|
||||
* All statements here are based on observation without confirmation from official sources.
|
||||
*
|
||||
* The .bin file contains all DVB-S, DVB-T and DVB-C channels that were found in a scan. Channels are sorted by source (DVB-S, -T, -C), TV/radio/data and then by display_number (or channel_index).
|
||||
* The .db file may contain a subset of DVB channels, particularly omitting data channels, but also contains additional non-DVB channels.
|
||||
* The link between DVB channel records in the .db and .bin file is via a common internal_provider_flag2 value.
|
||||
* In the .bin file the ipf2 is a unique value, but multiple .db channels may reference the same .bin channel.
|
||||
*
|
||||
* In Menu / Channels / Channel Management the list is based on the records from the .db file ordered by display_number.
|
||||
* Entering a channel's number on the remote control also seems to use the .db file records and offers selection between channels that start with the same display_number digits (which includes possible duplicates).
|
||||
*
|
||||
* The TV's EPG list is not ordered by the display_number. It somehow depends on the channel_index in the .db file and the physical order of records in the .bin file.
|
||||
* There is some nontransparent regrouping/reordering going on that may result in completely random looking EPG order when the physical records in the .bin are not in the same sequence as the channel_index
|
||||
* in the .db file.
|
||||
*
|
||||
* For zapping the TV seems uses the EPG channel order. Zapping fails when TV and radio channels are mixed. It works for the first part but after alternating TV/radio several times, it will zap back
|
||||
* to the first TV channel even if there are further channels of the same type as the currently tuned in channel in the list. Therefore it is highly recommended to have all TV channels first, then all radio channels.
|
||||
*
|
||||
* At least the initial firmware of these models has a quirks with inconsistent handling of internal_provider_flag2 as int16, uint16 and int32 with wrong sign-extension, causing lookup-failures
|
||||
* and duplicate channel records in list. In the .bin file the int32 value 55984 can either be -9552 or 55984 in the .db file (some rows have int16, others uint16 values!). For this reason
|
||||
* this code here casts the values down to uint16 to ensure lookups work fine. It's unknown if there can be values > 65535 in the .bin or .db file.
|
||||
*
|
||||
* The value in the tv.db channel_index is ambiguous because when searching for DVB-C and then DVB-S, both input sources start with channel_index=0, but when searching DVB-S first and then DVB-C,
|
||||
* the channel_index sequence is continuous and doesn't reset to 0. There's also duplicate values when the TV puts several channels on the same display_number.
|
||||
*
|
||||
* In this case of multiple .db channels referencing the same .bin channel the lowest display_number will be used and stored in the .bin channel.
|
||||
* When saving a new list, the channel_index will be set to a consecutive sequence following the ordering by display_number.
|
||||
*
|
||||
*/
|
||||
internal class IdtvChannelSerializer : SerializerBase
|
||||
{
|
||||
@@ -38,17 +69,19 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
enum Flags : ushort
|
||||
{
|
||||
Encrypted = 0x0002,
|
||||
Radio = 0x04,
|
||||
Data = 0x10,
|
||||
IsFavorite = 0x0080,
|
||||
Deleted = 0x0100,
|
||||
Deleted = 0x0100, // if really by "user" is uncertain
|
||||
Skip = 0x0400,
|
||||
CustomProgNr = 0x1000
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential,Pack=1)]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
unsafe struct IdtvChannel
|
||||
{
|
||||
public short U0; // always 1
|
||||
public short RecordLength; // 60 + length of channel name
|
||||
public ushort RecordLength; // 60 + length of channel name
|
||||
public short U4; // always 6
|
||||
public fixed byte U6[3]; // all 00
|
||||
public ushort U9; // 0 = sat, 18 = cable ?
|
||||
@@ -58,27 +91,59 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
public short U24; // always 100
|
||||
public short U26; // always 0
|
||||
public short U28; // always 0
|
||||
public short ProgNr;
|
||||
public ushort ProgNr;
|
||||
public short Lcn; // maybe?
|
||||
public fixed byte U32[2]; // e.g. 0a 01 00 00
|
||||
public Flags Flags;
|
||||
public fixed byte U38[4]; // 12 07 01 02
|
||||
public short Tsid;
|
||||
public short Onid;
|
||||
public short Sid;
|
||||
public ushort Tsid;
|
||||
public ushort Onid;
|
||||
public ushort Sid;
|
||||
public fixed byte U48[4];
|
||||
public uint InternalProviderFlag2; // seems like all sat channels are in the 20000-29999 range, dvb-c in 30000-39999
|
||||
|
||||
public int InternalProviderFlag2; // this is a unique .bin record identifier, used in the .db file's "internal_provider_flag2" to reference the .bin record
|
||||
|
||||
public fixed byte U56[8];
|
||||
//public fixed byte ChannelName[RecordLength - 60]; // pseudo-C# description of variable length channel name UTF8 data at end of structure
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region tv.db channels table
|
||||
/*
|
||||
* type: TYPE_PREVIEW, TYPE_OTHER, TYPE_DVB_S, TYPE_DVB_C, TYPE_DVB_T, TYPE_DVB_T2
|
||||
* service_type: SERVICE_TYPE_AUDIO_VIDEO, SERVICE_TYPE_AUDIO, SERVICE_TYPE_DATA
|
||||
* display_number: program number (entered on remote control)
|
||||
* internal_provider_flag1: DVB-C/T: frequency in Hz, DVB-S: freq in kHz
|
||||
* internal_provider_flag2: id to link from .db to .bin data record
|
||||
* internal_provider_flag3: maybe DVB-S satellite index (17 = Sat #18 in the TV's UI = Astra 19.2E), but also at times 0
|
||||
* internal_provider_flag4: symbol rate in sym/sec
|
||||
* input_type: 0=cable, 2=sat, ...
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region BinChannelEntry
|
||||
private class BinChannelEntry
|
||||
{
|
||||
public readonly int Index;
|
||||
public readonly IdtvChannel Channel;
|
||||
public readonly string Name;
|
||||
public readonly int StartOffset;
|
||||
|
||||
public BinChannelEntry(int index, IdtvChannel channel, string name, int startOffset)
|
||||
{
|
||||
this.Index = index;
|
||||
this.Channel = channel;
|
||||
this.Name = name;
|
||||
this.StartOffset = startOffset;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private readonly string dbFile;
|
||||
private readonly string binFile;
|
||||
private Dictionary<int, ChannelInfo> channelDict = new(); // maps record-index of .bin file to Channel object created from .db file
|
||||
private byte[] binFileData;
|
||||
private List<int> binFileRecordOffsets = new();
|
||||
|
||||
private byte[] binFileData; // will keep the originally loaded record order as-is, even after saving the file with a different physical record order
|
||||
private readonly Dictionary<ushort, BinChannelEntry> binChannelByInternalProviderFlag2 = new();
|
||||
|
||||
private readonly StringBuilder log = new();
|
||||
|
||||
@@ -135,84 +200,14 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
{
|
||||
// when the USB stick is removed without properly ejecting it, the .db file is often corrupted, causing an exception when running the first query
|
||||
View.Default.MessageBox(
|
||||
"The Panasonic tv.db file in this channel list is corrupted and can't be loaded.\n\n"+
|
||||
"The Panasonic tv.db file in this channel list is corrupted and can't be loaded.\n\n" +
|
||||
"After using the Hotel Menu's \"TV to USB\", press HOME / Notifications / your USB stick / Eject.\n" +
|
||||
"This will properly finish all write operations so the stick can be unplugged safely without data loss.");
|
||||
//throw new FileLoadException("Corrupt database file");
|
||||
return;
|
||||
}
|
||||
|
||||
this.ReadChannelsFromDatabase(cmd);
|
||||
this.ReadIdtvChannelsBin();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ReadChannelsFromDatabase()
|
||||
private void ReadChannelsFromDatabase(SqliteCommand cmd)
|
||||
{
|
||||
cmd.CommandText = "select * from channels where type in ('TYPE_DVB_S','TYPE_DVB_C','TYPE_DVB_T','TYPE_DVB_T2')";
|
||||
using var r = cmd.ExecuteReader();
|
||||
|
||||
var cols = new Dictionary<string, int>();
|
||||
for (int i = 0, c = r.FieldCount; i < c; i++)
|
||||
cols[r.GetName(i)] = i;
|
||||
|
||||
while (r.Read())
|
||||
{
|
||||
var id = r.GetInt64(cols["_id"]);
|
||||
var type = r.GetString(cols["type"]);
|
||||
var svcType = r.GetString(cols["service_type"]);
|
||||
var name = r.IsDBNull(cols["display_name"]) ? "" : r.GetString(cols["display_name"]);
|
||||
var progNrStr = r.GetString(cols["display_number"]);
|
||||
if (!int.TryParse(progNrStr, out var progNr))
|
||||
continue;
|
||||
|
||||
SignalSource signalSource = 0;
|
||||
switch (type)
|
||||
{
|
||||
case "TYPE_DVB_C": signalSource |= SignalSource.Cable; break;
|
||||
case "TYPE_DVB_S": signalSource |= SignalSource.Sat; break;
|
||||
case "TYPE_DVB_T": signalSource |= SignalSource.Antenna; break;
|
||||
case "TYPE_DVB_T2": signalSource |= SignalSource.Antenna; break;
|
||||
}
|
||||
|
||||
switch (svcType)
|
||||
{
|
||||
case "SERVICE_TYPE_AUDIO": signalSource |= SignalSource.Radio; break;
|
||||
case "SERVICE_TYPE_AUDIO_VIDEO": signalSource |= SignalSource.Tv; break;
|
||||
default: signalSource |= SignalSource.Data; break;
|
||||
}
|
||||
|
||||
var ch = new ChannelInfo(signalSource, id, progNr, name);
|
||||
ch.Lock = r.GetBoolean(cols["locked"]);
|
||||
ch.Skip = !r.GetBoolean(cols["browsable"]);
|
||||
ch.Hidden = !r.GetBoolean(cols["searchable"]);
|
||||
ch.Encrypted = r.GetBoolean(cols["scrambled"]);
|
||||
|
||||
ch.OriginalNetworkId = r.GetInt32(cols["original_network_id"]);
|
||||
ch.TransportStreamId = r.GetInt32(cols["transport_stream_id"]);
|
||||
ch.ServiceId = r.GetInt32(cols["service_id"]);
|
||||
ch.FreqInMhz = r.GetInt64(cols["internal_provider_flag1"]) / 1000; // for DVB-S it is in MHz, for DVB-C/T it is in kHz
|
||||
if (ch.FreqInMhz >= 13000)
|
||||
ch.FreqInMhz /= 1000;
|
||||
ch.SymbolRate = r.GetInt32(cols["internal_provider_flag4"]) / 1000;
|
||||
if ((signalSource & SignalSource.Radio) != 0)
|
||||
ch.ServiceTypeName = "Radio";
|
||||
else if ((signalSource & SignalSource.Tv) != 0)
|
||||
ch.ServiceTypeName = r.GetBoolean(cols["is_hd"]) ? "HD-TV" : "SD-TV";
|
||||
else
|
||||
ch.ServiceTypeName = "Data";
|
||||
ch.RecordOrder = r.GetInt32(cols["channel_index"]); // record index in the idtvChannel.bin file
|
||||
ch.Favorites = (Favorites)r.GetByte(cols["favorite"]);
|
||||
|
||||
var list = this.DataRoot.GetChannelList(signalSource);
|
||||
this.DataRoot.AddChannel(list, ch);
|
||||
|
||||
if (channelDict.TryGetValue(ch.RecordOrder, out var otherChannel))
|
||||
throw new FileLoadException($"tv.db channel _ids {otherChannel.RecordIndex} ({otherChannel.Name}) and {ch.RecordIndex} ({ch.Name}) both reference same idtvChannel.bin record {ch.RecordOrder}\n"+
|
||||
"Please make sure to search satellite channels first and cable/antenna afterwards.");
|
||||
channelDict.Add(ch.RecordOrder, ch);
|
||||
}
|
||||
this.ReadChannelsFromDatabase(cmd);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -240,48 +235,39 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
r.ReadBytes(16); // md5
|
||||
i = 0;
|
||||
|
||||
#if DUMP
|
||||
log.AppendLine($"#\tname\tprogNr\tonid-tsid-sid\tflags\tlcn\tipf2");
|
||||
#endif
|
||||
|
||||
// load data records and store them in the binChannelByInternalProviderFlag2 dictionary
|
||||
var structSize = Marshal.SizeOf<IdtvChannel>();
|
||||
while (strm.Position + structSize <= binFileData.Length)
|
||||
{
|
||||
var off = strm.Position;
|
||||
binFileRecordOffsets.Add((int)off);
|
||||
|
||||
var off = (int)strm.Position;
|
||||
|
||||
// C# trickery to read binary data into a structure
|
||||
var bytes = r.ReadBytes(structSize);
|
||||
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
|
||||
var chan = Marshal.PtrToStructure<IdtvChannel>(handle.AddrOfPinnedObject());
|
||||
handle.Free();
|
||||
|
||||
var freq = chan.Freq / 1000;
|
||||
if (freq >= 13000)
|
||||
freq /= 1000;
|
||||
var symRate = chan.SymRate / 1000;
|
||||
var progNr = chan.ProgNr;
|
||||
var name = Encoding.UTF8.GetString(r.ReadBytes(chan.RecordLength - 60));
|
||||
|
||||
log.AppendLine($"{i}\t{name}\t{progNr}\t{chan.Onid}-{chan.Tsid}-{chan.Sid}\t{(ushort)chan.Flags:X4}\t{chan.Lcn}\t{chan.InternalProviderFlag2}");
|
||||
|
||||
if (channelDict.TryGetValue(i, out var ch))
|
||||
try
|
||||
{
|
||||
if (ch.OldProgramNr != progNr)
|
||||
throw new FileLoadException($"mismatching program_number between tv.db _id {ch.RecordIndex} ({ch.OldProgramNr}) and idtvChannel.bin record {i} ({progNr})");
|
||||
if (ch.Name != name)
|
||||
throw new FileLoadException($"mismatching name between tv.db _id {ch.RecordIndex} ({ch.Name}) and idtvChannel.bin record {i} ({name})");
|
||||
if (Math.Abs(ch.FreqInMhz - freq) > 2)
|
||||
throw new FileLoadException($"mismatching frequency between tv.db _id {ch.RecordIndex} ({ch.FreqInMhz}) and idtvChannel.bin record {i} ({freq})");
|
||||
if (Math.Abs(ch.SymbolRate - symRate) > 2)
|
||||
throw new FileLoadException($"mismatching symbol rate between tv.db _id {ch.RecordIndex} ({ch.SymbolRate}) and idtvChannel.bin record {i} ({symRate})");
|
||||
var chan = Marshal.PtrToStructure<IdtvChannel>(handle.AddrOfPinnedObject());
|
||||
var name = Encoding.UTF8.GetString(r.ReadBytes(chan.RecordLength - 60));
|
||||
|
||||
if (ch.Encrypted != ((chan.Flags & Flags.Encrypted) != 0))
|
||||
throw new FileLoadException($"mismatching crypt-flag between tv.db _id {ch.RecordIndex} ({ch.Encrypted}) and idtvChannel.bin record {i}");
|
||||
if (ch.Skip != ((chan.Flags & Flags.Skip) != 0)) // it seems running a DVB-C search will alter the "browsable" flag of already existing DVB-S channels
|
||||
log.AppendLine($"mismatching browsable-flag between tv.db _id {ch.RecordIndex} ({ch.Skip}) and idtvChannel.bin record {i}");
|
||||
if ((ch.Favorites == 0) != ((chan.Flags & Flags.IsFavorite) == 0))
|
||||
throw new FileLoadException($"mismatching favorites-info between tv.db _id {ch.RecordIndex} ({ch.Favorites}) and idtvChannel.bin record {i}");
|
||||
var key = (ushort)chan.InternalProviderFlag2;
|
||||
|
||||
ch.AddDebug((ushort)chan.Flags);
|
||||
if (this.binChannelByInternalProviderFlag2.TryGetValue(key, out var ch))
|
||||
throw new FileLoadException($"{binFile} channel records {ch.Index} and {i} have duplicate internal_provider_flag2 value {key}.");
|
||||
|
||||
this.binChannelByInternalProviderFlag2.Add(key, new BinChannelEntry(i, chan, name, off));
|
||||
|
||||
#if DUMP
|
||||
var progNr = chan.ProgNr;
|
||||
log.AppendLine($"{i}\t{name}\t{progNr}\t{chan.Onid}-{chan.Tsid}-{chan.Sid}\t0x{(ushort)chan.Flags:X4}\t{chan.Lcn}\t{chan.InternalProviderFlag2}");
|
||||
#endif
|
||||
}
|
||||
finally
|
||||
{
|
||||
handle.Free();
|
||||
}
|
||||
|
||||
++i;
|
||||
@@ -289,56 +275,189 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
|
||||
if (i < numRecords)
|
||||
throw new FileLoadException($"idtvChannel contains only {i} data records, but expected {numRecords}");
|
||||
}
|
||||
#endregion
|
||||
|
||||
// make sure no channel from tv.db refers to a record_index that does not exist in idtvChannel.bin
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
#region ReadChannelsFromDatabase()
|
||||
private void ReadChannelsFromDatabase(SqliteCommand cmd)
|
||||
{
|
||||
cmd.CommandText = "select * from channels where type in ('TYPE_DVB_S','TYPE_DVB_C','TYPE_DVB_T','TYPE_DVB_T2') order by _id";
|
||||
using var r = cmd.ExecuteReader();
|
||||
|
||||
var cols = new Dictionary<string, int>();
|
||||
for (int i = 0, c = r.FieldCount; i < c; i++)
|
||||
cols[r.GetName(i)] = i;
|
||||
|
||||
var channelDict = new Dictionary<ushort, ChannelInfo>(); // maps InternalProviderFlag2 of .bin file to Channel object created from .db file
|
||||
|
||||
while (r.Read())
|
||||
{
|
||||
foreach (var ch in list.Channels)
|
||||
var id = r.GetInt64(cols["_id"]);
|
||||
var type = r.GetString(cols["type"]);
|
||||
var svcType = r.GetString(cols["service_type"]);
|
||||
var name = r.IsDBNull(cols["display_name"]) ? "" : r.GetString(cols["display_name"]);
|
||||
var progNrStr = r.GetString(cols["display_number"]);
|
||||
if (!int.TryParse(progNrStr, out var progNr))
|
||||
continue;
|
||||
|
||||
SignalSource signalSource = 0;
|
||||
switch (type)
|
||||
{
|
||||
if (ch.RecordOrder < 0 || ch.RecordOrder >= numRecords)
|
||||
throw new FileLoadException($"{list.ShortCaption} channel with _id {ch.RecordIndex} refers to non-existing index {ch.RecordOrder} in idtvChannel.bin");
|
||||
case "TYPE_DVB_C":
|
||||
signalSource |= SignalSource.Cable;
|
||||
break;
|
||||
case "TYPE_DVB_S":
|
||||
signalSource |= SignalSource.Sat;
|
||||
break;
|
||||
case "TYPE_DVB_T":
|
||||
signalSource |= SignalSource.Antenna;
|
||||
break;
|
||||
case "TYPE_DVB_T2":
|
||||
signalSource |= SignalSource.Antenna;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (svcType)
|
||||
{
|
||||
case "SERVICE_TYPE_AUDIO":
|
||||
signalSource |= SignalSource.Radio;
|
||||
break;
|
||||
case "SERVICE_TYPE_AUDIO_VIDEO":
|
||||
signalSource |= SignalSource.Tv;
|
||||
break;
|
||||
default:
|
||||
signalSource |= SignalSource.Data;
|
||||
break;
|
||||
}
|
||||
|
||||
var ch = new DbChannel(signalSource, id, progNr, name);
|
||||
ch.Lock = r.GetBoolean(cols["locked"]);
|
||||
ch.Skip = !r.GetBoolean(cols["browsable"]);
|
||||
ch.Hidden = !r.GetBoolean(cols["searchable"]);
|
||||
ch.Encrypted = r.GetBoolean(cols["scrambled"]);
|
||||
|
||||
ch.OriginalNetworkId = r.GetInt32(cols["original_network_id"]);
|
||||
ch.TransportStreamId = r.GetInt32(cols["transport_stream_id"]);
|
||||
ch.ServiceId = r.GetInt32(cols["service_id"]);
|
||||
ch.FreqInMhz = r.GetInt64(cols["internal_provider_flag1"]) / 1000; // for DVB-S it is in MHz, for DVB-C/T it is in kHz
|
||||
if (ch.FreqInMhz >= 13000)
|
||||
ch.FreqInMhz /= 1000;
|
||||
ch.SymbolRate = r.GetInt32(cols["internal_provider_flag4"]) / 1000;
|
||||
if ((signalSource & SignalSource.Radio) != 0)
|
||||
ch.ServiceTypeName = "Radio";
|
||||
else if ((signalSource & SignalSource.Tv) != 0)
|
||||
ch.ServiceTypeName = r.GetBoolean(cols["is_hd"]) ? "HD-TV" : "SD-TV";
|
||||
else
|
||||
ch.ServiceTypeName = "Data";
|
||||
ch.InternalProviderFlag2 = (ushort)r.GetInt32(cols["internal_provider_flag2"]); // reference between idtvChannel.bin and tv.db records.
|
||||
ch.RecordOrder = ch.InternalProviderFlag2; // r.GetInt32(cols["channel_index"]); // only read for debugging purpose
|
||||
ch.Favorites = (Favorites)r.GetByte(cols["favorite"]);
|
||||
|
||||
var list = this.DataRoot.GetChannelList(signalSource);
|
||||
if (channelDict.TryGetValue((ushort)ch.InternalProviderFlag2, out var olderChannel))
|
||||
{
|
||||
log.AppendLine(
|
||||
//$"tv.db channel _id {olderChannel.RecordIndex} ({olderChannel.Name}) is overridden by _id {ch.RecordIndex} ({ch.Name}) with same internal_provider_flag2 {ch.InternalProviderFlag2}");
|
||||
$"tv.db channel _id {ch.RecordIndex} (#{ch.OldProgramNr} {ch.Name}) is a duplicate of _id {olderChannel.RecordIndex} (#{olderChannel.OldProgramNr} {olderChannel.Name}) with same internal_provider_flag2 {ch.InternalProviderFlag2}");
|
||||
//list.RemoveChannel(olderChannel);
|
||||
}
|
||||
else
|
||||
channelDict[(ushort)ch.InternalProviderFlag2] = ch;
|
||||
|
||||
this.DataRoot.AddChannel(list, ch);
|
||||
|
||||
// validate consistency between .db and .bin (multiple .db rows can reference the same .bin record)
|
||||
if (!this.binChannelByInternalProviderFlag2.TryGetValue((ushort)ch.InternalProviderFlag2, out var idtvEntry))
|
||||
throw new FileLoadException($"{list.ShortCaption} channel with _id {ch.RecordIndex} refers to non-existing idtvChannel.bin record with internal_provider_flag2 {ch.InternalProviderFlag2}");
|
||||
ValidateChannelData(ch, idtvEntry);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ValidateChannelData()
|
||||
private void ValidateChannelData(DbChannel ch, BinChannelEntry entry)
|
||||
{
|
||||
var chan = entry.Channel;
|
||||
var name = entry.Name;
|
||||
var i = entry.Index;
|
||||
|
||||
var freq = chan.Freq / 1000;
|
||||
if (freq >= 13000)
|
||||
freq /= 1000;
|
||||
var symRate = chan.SymRate / 1000;
|
||||
|
||||
//var progNr = chan.ProgNr;
|
||||
//if (ch.OldProgramNr != progNr) // multiple .db rows with different display_number can reference the same .db row, so skip this check
|
||||
// throw new FileLoadException($"mismatching display_number between tv.db _id {ch.RecordIndex} ({ch.OldProgramNr}) and idtvChannel.bin record {i} ({progNr})");
|
||||
if (ch.Name != name)
|
||||
throw new FileLoadException($"mismatching name between tv.db _id {ch.RecordIndex} ({ch.Name}) and idtvChannel.bin record {i} ({name})");
|
||||
if (Math.Abs(ch.FreqInMhz - freq) > 2)
|
||||
throw new FileLoadException($"mismatching frequency between tv.db _id {ch.RecordIndex} ({ch.FreqInMhz}) and idtvChannel.bin record {i} ({freq})");
|
||||
if (Math.Abs(ch.SymbolRate - symRate) > 2)
|
||||
throw new FileLoadException($"mismatching symbol rate between tv.db _id {ch.RecordIndex} ({ch.SymbolRate}) and idtvChannel.bin record {i} ({symRate})");
|
||||
|
||||
if (ch.Encrypted != ((chan.Flags & Flags.Encrypted) != 0))
|
||||
log.AppendLine($"mismatching crypt-flag between tv.db _id {ch.RecordIndex} ({ch.Encrypted}) and idtvChannel.bin record {i}");
|
||||
if (ch.Skip != ((chan.Flags & Flags.Skip) != 0)) // it seems running a DVB-C search will alter the "browsable" flag of already existing DVB-S channels
|
||||
log.AppendLine($"mismatching browsable-flag between tv.db _id {ch.RecordIndex} ({ch.Skip}) and idtvChannel.bin record {i}");
|
||||
if ((ch.Favorites == 0) != ((chan.Flags & Flags.IsFavorite) == 0))
|
||||
log.AppendLine($"mismatching favorites-info between tv.db _id {ch.RecordIndex} ({ch.Favorites}) and idtvChannel.bin record {i}");
|
||||
|
||||
ch.AddDebug((ushort)chan.Flags);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Save()
|
||||
public override void Save(string tvOutputFile)
|
||||
{
|
||||
// saving the list requires to:
|
||||
// - update fields inside the data records and physically reorder the records
|
||||
// - update fields inside the .bin file data records and physically reorder the records
|
||||
// - updating records in the .db file
|
||||
// - updating all channel record indexes in this loader's internal data in channelDict, binFileRecordOffsets and channelInfo.RecordOrder for consecutive save operations to work
|
||||
|
||||
GetNewIdtvChannelBinRecordOrder(out var newToOld, out var oldToNew);
|
||||
GetNewIdtvChannelBinRecordOrder(out var newToOld, out var newChannelIndexMap, out var channelDict);
|
||||
|
||||
SaveIdtvChannelBin(newToOld);
|
||||
SaveTvDb(oldToNew);
|
||||
SaveIdtvChannelBin(newToOld, channelDict);
|
||||
SaveTvDb(newChannelIndexMap);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetNewBinFileRecordOrder()
|
||||
private void GetNewIdtvChannelBinRecordOrder(out List<int> newToOld, out IDictionary<int, int> oldToNew)
|
||||
private void GetNewIdtvChannelBinRecordOrder(out List<ushort> newToOld, out IDictionary<ushort, int> newChannelIndexMap, out Dictionary<ushort,DbChannel> channelMap)
|
||||
{
|
||||
// create forward mapping by sorting a list that contains old record numbers. The index of the list is the new record number.
|
||||
newToOld = new List<int>(binFileRecordOffsets.Count);
|
||||
for (int i = 0, c=this.binFileRecordOffsets.Count; i<c; i++)
|
||||
newToOld.Add(i);
|
||||
// detect the smallest new program number (from possibly multiple .db channels) for each specific .bin channel
|
||||
var channelDict = new Dictionary<ushort, DbChannel>();
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
{
|
||||
foreach (var ch in list.Channels)
|
||||
{
|
||||
if (ch is not DbChannel dbc)
|
||||
continue;
|
||||
if (!channelDict.TryGetValue((ushort)dbc.InternalProviderFlag2, out var cur) || ch.NewProgramNr >= 0 && ch.NewProgramNr <= cur.NewProgramNr)
|
||||
channelDict[(ushort)dbc.InternalProviderFlag2] = dbc;
|
||||
}
|
||||
}
|
||||
|
||||
var offFreq = (int)Marshal.OffsetOf<IdtvChannel>(nameof(IdtvChannel.Freq));
|
||||
|
||||
// sort list of ipf2 values to get the desired channel order
|
||||
newToOld = this.binChannelByInternalProviderFlag2.Keys.ToList();
|
||||
newToOld.Sort((a, b) =>
|
||||
{
|
||||
var entry1 = this.binChannelByInternalProviderFlag2[a];
|
||||
var entry2 = this.binChannelByInternalProviderFlag2[b];
|
||||
|
||||
// all sat channels must come first before cable/antenna channels
|
||||
var freq1 = BitConverter.ToUInt32(this.binFileData, binFileRecordOffsets[a] + offFreq);
|
||||
var freq2 = BitConverter.ToUInt32(this.binFileData, binFileRecordOffsets[b] + offFreq);
|
||||
var freq1 = entry1.Channel.Freq;
|
||||
var freq2 = entry2.Channel.Freq;
|
||||
var c = (freq1 < 14000000 ? 0 : 1).CompareTo(freq2 < 14000000 ? 0 : 1); // hack: Sat has values below 14 000 000 (in kHz), Cable/antenna above (in Hz)
|
||||
if (c != 0)
|
||||
return c;
|
||||
|
||||
this.channelDict.TryGetValue(a, out var ch1);
|
||||
this.channelDict.TryGetValue(b, out var ch2);
|
||||
channelDict.TryGetValue(a, out var ch1);
|
||||
channelDict.TryGetValue(b, out var ch2);
|
||||
|
||||
// existing channels first (TV, radio), non-existing ones last (data)
|
||||
if (ch1 == null && ch2 == null)
|
||||
return a.CompareTo(b);
|
||||
if (ch2 == null)
|
||||
@@ -346,112 +465,134 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
if (ch1 == null)
|
||||
return +1;
|
||||
|
||||
c = ((int)ch1.SignalSource).CompareTo((int)ch2.SignalSource); // group TV/Radio/Data
|
||||
// group TV/Radio/Data
|
||||
var ss1 = GetSignalSource(ch1, a);
|
||||
var ss2 = GetSignalSource(ch2, b);
|
||||
c = ((int)ss1).CompareTo((int)ss2);
|
||||
if (c != 0)
|
||||
return c;
|
||||
|
||||
// lower display number first
|
||||
c = ch1.NewProgramNr.CompareTo(ch2.NewProgramNr);
|
||||
if (c != 0)
|
||||
return c;
|
||||
|
||||
return a.CompareTo(b); // default keeps old order
|
||||
// keep previous order
|
||||
return a.CompareTo(b);
|
||||
});
|
||||
|
||||
// create reverse mapping
|
||||
oldToNew = new Dictionary<int, int>(newToOld.Count);
|
||||
for (int i = 0; i < newToOld.Count; i++)
|
||||
oldToNew[newToOld[i]] = i;
|
||||
newChannelIndexMap = new Dictionary<ushort, int>();
|
||||
for (int i = 0, c = newToOld.Count; i < c; i++)
|
||||
newChannelIndexMap[newToOld[i]] = i;
|
||||
|
||||
channelMap = channelDict;
|
||||
|
||||
SignalSource GetSignalSource(DbChannel channel, ushort internalProviderFlag2)
|
||||
{
|
||||
if (channel != null)
|
||||
return channel.SignalSource;
|
||||
var binEntry = this.binChannelByInternalProviderFlag2[internalProviderFlag2];
|
||||
|
||||
var flags = binEntry.Channel.Flags;
|
||||
if ((flags & Flags.Radio) != 0)
|
||||
return SignalSource.Radio;
|
||||
if ((flags & Flags.Data) != 0)
|
||||
return SignalSource.Data;
|
||||
return SignalSource.Tv;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SaveIdtvChannelBin()
|
||||
private void SaveIdtvChannelBin(IList<int> newToOld)
|
||||
private void SaveIdtvChannelBin(IList<ushort> newToOld, IDictionary<ushort, DbChannel> channelMap)
|
||||
{
|
||||
UpdateIdtvChannelBinRecords();
|
||||
ReorderBinFileRecords(newToOld);
|
||||
UpdateIdtvChannelBinRecords(channelMap);
|
||||
var newBin = ReorderBinFileRecords(newToOld);
|
||||
|
||||
// update MD5 checksum
|
||||
var md5 = MD5.Create();
|
||||
var checksum = md5.ComputeHash(binFileData, 8 + 16, binFileData.Length - 8 - 16);
|
||||
Array.Copy(checksum, 0, binFileData, 8, 16);
|
||||
var checksum = md5.ComputeHash(newBin, 8 + 16, newBin.Length - 8 - 16);
|
||||
Array.Copy(checksum, 0, newBin, 8, 16);
|
||||
|
||||
File.WriteAllBytes(binFile, binFileData);
|
||||
File.WriteAllBytes(this.binFile, newBin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region UpdateIdtvChannelBinRecords()
|
||||
private void UpdateIdtvChannelBinRecords()
|
||||
private void UpdateIdtvChannelBinRecords(IDictionary<ushort, DbChannel> channelMap)
|
||||
{
|
||||
// in-place update of the old .bin file data
|
||||
// in-place update of channel data in the initially loaded binFileData
|
||||
|
||||
var offProgNr = (int)Marshal.OffsetOf<IdtvChannel>(nameof(IdtvChannel.ProgNr));
|
||||
var offFlags = (int)Marshal.OffsetOf<IdtvChannel>(nameof(IdtvChannel.Flags));
|
||||
|
||||
var w = new BinaryWriter(new MemoryStream(this.binFileData));
|
||||
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
foreach(var entry in channelMap)
|
||||
{
|
||||
foreach (var ch in list.Channels)
|
||||
{
|
||||
if (ch.IsProxy)
|
||||
continue;
|
||||
var filePosition = this.binFileRecordOffsets[ch.RecordOrder];
|
||||
w.Seek(filePosition + offProgNr, SeekOrigin.Begin);
|
||||
//w.Write(ch.NewProgramNr > 0 ? (ushort)ch.NewProgramNr : (ushort)0xFFFE); // deleted channels have -2 / 0xFFFE
|
||||
w.Write(ch.NewProgramNr);
|
||||
var dbc = entry.Value;
|
||||
|
||||
if (!this.binChannelByInternalProviderFlag2.TryGetValue(entry.Key, out var binEntry))
|
||||
continue;
|
||||
|
||||
// update display_number
|
||||
var filePosition = binEntry.StartOffset;
|
||||
w.Seek(filePosition + offProgNr, SeekOrigin.Begin);
|
||||
//w.Write(ch.NewProgramNr > 0 ? (ushort)ch.NewProgramNr : (ushort)0xFFFE); // deleted channels have -2 / 0xFFFE
|
||||
w.Write(dbc.NewProgramNr);
|
||||
|
||||
|
||||
// update flags
|
||||
var off = filePosition + offFlags;
|
||||
var flags = BitConverter.ToUInt16(this.binFileData, off);
|
||||
if (ch.Favorites == 0)
|
||||
flags = (ushort)(flags & ~(ushort)Flags.IsFavorite);
|
||||
else
|
||||
flags = (ushort)(flags | (ushort)Flags.IsFavorite);
|
||||
|
||||
if (ch.Skip)
|
||||
flags = (ushort)(flags | (ushort)Flags.Skip);
|
||||
else
|
||||
flags = (ushort)(flags & ~(ushort)Flags.Skip);
|
||||
// update flags
|
||||
var off = filePosition + offFlags;
|
||||
var flags = BitConverter.ToUInt16(this.binFileData, off);
|
||||
if (dbc.Favorites == 0)
|
||||
flags = (ushort)(flags & ~(ushort)Flags.IsFavorite);
|
||||
else
|
||||
flags = (ushort)(flags | (ushort)Flags.IsFavorite);
|
||||
|
||||
if (ch.IsDeleted)
|
||||
flags |= (ushort)Flags.Deleted;
|
||||
if (dbc.Skip)
|
||||
flags = (ushort)(flags | (ushort)Flags.Skip);
|
||||
else
|
||||
flags = (ushort)(flags & ~(ushort)Flags.Skip);
|
||||
|
||||
flags |= (ushort)Flags.CustomProgNr;
|
||||
w.Seek(filePosition + offFlags, SeekOrigin.Begin);
|
||||
w.Write(flags);
|
||||
}
|
||||
flags = (ushort)(flags & ~(ushort)Flags.Data); // Sky option channels can transformed from Data to TV and might otherwise be out-of-order in EPG and zapping
|
||||
|
||||
if (dbc.IsDeleted)
|
||||
flags |= (ushort)Flags.Deleted;
|
||||
|
||||
flags |= (ushort)Flags.CustomProgNr;
|
||||
|
||||
w.Seek(filePosition + offFlags, SeekOrigin.Begin);
|
||||
w.Write(flags);
|
||||
}
|
||||
|
||||
|
||||
w.Flush();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ReorderBinFileRecords()
|
||||
private void ReorderBinFileRecords(IList<int> newToOld)
|
||||
private byte[] ReorderBinFileRecords(IList<ushort> newToOld)
|
||||
{
|
||||
using var mem = new MemoryStream(this.binFileData.Length);
|
||||
mem.Write(binFileData, 0, 8 + 16); // copy header
|
||||
mem.Write(this.binFileData, 0, 8 + 16); // copy header
|
||||
|
||||
var newOffsets = new List<int>(newToOld.Count);
|
||||
foreach (var oldIndex in newToOld)
|
||||
foreach (var ipf2 in newToOld)
|
||||
{
|
||||
newOffsets.Add((int)mem.Position);
|
||||
|
||||
// TODO: this only works as long as channel name editing is not supported
|
||||
var off = binFileRecordOffsets[oldIndex];
|
||||
var recordLen = BitConverter.ToInt16(binFileData, off + (int)Marshal.OffsetOf<IdtvChannel>(nameof(IdtvChannel.RecordLength))) + 4;
|
||||
mem.Write(binFileData, off, recordLen);
|
||||
var entry = this.binChannelByInternalProviderFlag2[ipf2];
|
||||
var off = entry.StartOffset;
|
||||
var recordLen = entry.Channel.RecordLength + 4;
|
||||
mem.Write(this.binFileData, off, recordLen);
|
||||
}
|
||||
mem.Flush();
|
||||
binFileRecordOffsets = newOffsets;
|
||||
|
||||
binFileData = new byte[mem.Length];
|
||||
Array.Copy(mem.GetBuffer(), 0, binFileData, 0, mem.Length);
|
||||
mem.Flush();
|
||||
return mem.GetBuffer();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SaveTvDb()
|
||||
private void SaveTvDb(IDictionary<int, int> oldToNew)
|
||||
private void SaveTvDb(IDictionary<ushort, int> newChannelIndexMap)
|
||||
{
|
||||
string connString = "Data Source=" + this.dbFile;
|
||||
using var db = new SqliteConnection(connString);
|
||||
@@ -468,6 +609,7 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
upd.Parameters.Add("@locked", SqliteType.Integer);
|
||||
upd.Parameters.Add("@fav", SqliteType.Integer);
|
||||
upd.Parameters.Add("@recIdx", SqliteType.Integer);
|
||||
//upd.Parameters.Add("@ipf2", SqliteType.Integer);
|
||||
upd.Prepare();
|
||||
|
||||
using var del = db.CreateCommand();
|
||||
@@ -475,12 +617,11 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
del.Parameters.Add("@id", SqliteType.Integer);
|
||||
del.Prepare();
|
||||
|
||||
var newChannelDict = new Dictionary<int, ChannelInfo>();
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
{
|
||||
foreach (var ch in list.Channels)
|
||||
{
|
||||
if (ch.IsProxy)
|
||||
if (ch is not DbChannel dbc)
|
||||
continue;
|
||||
if (ch.NewProgramNr < 0 || ch.IsDeleted)
|
||||
{
|
||||
@@ -489,24 +630,18 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
}
|
||||
else
|
||||
{
|
||||
var newRecordIndex = oldToNew[ch.RecordOrder];
|
||||
|
||||
upd.Parameters["@id"].Value = ch.RecordIndex;
|
||||
upd.Parameters["@progNr"].Value = ch.NewProgramNr;
|
||||
upd.Parameters["@browseable"].Value = !ch.Skip;
|
||||
//upd.Parameters["@searchable"].Value = !ch.Hidden;
|
||||
upd.Parameters["@locked"].Value = ch.Lock;
|
||||
upd.Parameters["@fav"].Value = (int)ch.Favorites;
|
||||
upd.Parameters["@recIdx"].Value = newRecordIndex;
|
||||
upd.Parameters["@recIdx"].Value = newChannelIndexMap[(ushort)dbc.InternalProviderFlag2];
|
||||
//upd.Parameters["@ipf2"].Value = (int)(ushort)dbc.InternalProviderFlag2; // fix broken short/ushort/int sign extension
|
||||
upd.ExecuteNonQuery();
|
||||
|
||||
ch.RecordOrder = newRecordIndex;
|
||||
|
||||
newChannelDict.Add(newRecordIndex, ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.channelDict = newChannelDict;
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -32,6 +33,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -42,6 +44,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
@@ -52,6 +55,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -108,5 +108,22 @@ namespace ChanSort.Loader.SatcoDX
|
||||
this.ShortName = shortName.TrimEnd();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Export()
|
||||
public void Export(byte[] buffer, Encoding encoding)
|
||||
{
|
||||
Array.Copy(this.data, this.FileOffset, buffer, 0, this.Length + 1);
|
||||
if (!this.IsNameModified)
|
||||
return;
|
||||
|
||||
// 43-50 + 115-126 in version 103 or 115-131 in version 105: channel name
|
||||
var bytes = encoding.GetBytes(this.Name);
|
||||
Tools.MemSet(buffer, 43, 32, 8);
|
||||
Tools.MemSet(buffer, 115, 32, buffer.Length - 115 -1);
|
||||
Array.Copy(bytes, 0, buffer, 43, Math.Min(bytes.Length, 8));
|
||||
if (bytes.Length > 8)
|
||||
Array.Copy(bytes, 8, buffer, 115, Math.Min(bytes.Length - 8, this.Length - 115 - 1));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace ChanSort.Loader.SatcoDX
|
||||
|
||||
public Serializer(string inputFile) : base(inputFile)
|
||||
{
|
||||
this.Features.ChannelNameEdit = ChannelNameEditMode.None;
|
||||
this.Features.ChannelNameEdit = ChannelNameEditMode.All;
|
||||
this.Features.DeleteMode = DeleteMode.Physically;
|
||||
this.Features.CanSkipChannels = false;
|
||||
this.Features.CanLockChannels = false;
|
||||
@@ -79,19 +79,22 @@ namespace ChanSort.Loader.SatcoDX
|
||||
this.FileName = tvOutputFile;
|
||||
}
|
||||
|
||||
using (var file = new FileStream(tvOutputFile, FileMode.Create))
|
||||
using var file = new FileStream(tvOutputFile, FileMode.Create);
|
||||
byte[] buffer = null;
|
||||
foreach (var channel in this.allChannels.GetChannelsByNewOrder())
|
||||
{
|
||||
foreach (var channel in this.allChannels.GetChannelsByNewOrder())
|
||||
{
|
||||
// when a reference list was applied, the list may contain proxy entries for deleted channels, which must be ignored
|
||||
if (channel.IsProxy || channel.IsDeleted)
|
||||
continue;
|
||||
if (channel is Channel realChannel)
|
||||
file.Write(this.content, realChannel.FileOffset, realChannel.Length + 1);
|
||||
}
|
||||
// when a reference list was applied, the list may contain proxy entries for deleted channels, which must be ignored
|
||||
if (channel.IsProxy || channel.IsDeleted)
|
||||
continue;
|
||||
if (channel is not Channel realChannel)
|
||||
continue;
|
||||
|
||||
file.Write(this.content, this.trailingDataPos, this.content.Length - this.trailingDataPos);
|
||||
buffer ??= new byte[realChannel.Length + 1];
|
||||
realChannel.Export(buffer, this.DefaultEncoding);
|
||||
file.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
|
||||
file.Write(this.content, this.trailingDataPos, this.content.Length - this.trailingDataPos);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -106,7 +109,7 @@ namespace ChanSort.Loader.SatcoDX
|
||||
get => base.DefaultEncoding;
|
||||
set
|
||||
{
|
||||
if (value == this.DefaultEncoding)
|
||||
if (ReferenceEquals(value, this.DefaultEncoding))
|
||||
return;
|
||||
base.DefaultEncoding = value;
|
||||
|
||||
|
||||
31
source/ChanSort/MainForm.Designer.cs
generated
31
source/ChanSort/MainForm.Designer.cs
generated
@@ -115,6 +115,7 @@
|
||||
this.miOpen = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.miReload = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.miRestoreOriginal = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.miDeleteBackup = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.miFileInformation = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.miSave = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.miSaveAs = new DevExpress.XtraBars.BarButtonItem();
|
||||
@@ -220,7 +221,6 @@
|
||||
this.popupInputSource = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.popupFavList = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.timerSelectFocusedRow = new System.Windows.Forms.Timer(this.components);
|
||||
this.miDeleteBackup = new DevExpress.XtraBars.BarButtonItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit();
|
||||
this.splitContainerControl1.Panel1.SuspendLayout();
|
||||
@@ -1142,12 +1142,9 @@
|
||||
this.bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miFile),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miOpen),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miOpenReferenceFile),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miReload),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSave, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSaveAs),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSaveReferenceFile),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miPrint, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSave),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miPrint),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miEdit, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.mnuFavSet),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miLockOn),
|
||||
@@ -1180,14 +1177,14 @@
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miReload),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miRestoreOriginal),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miDeleteBackup),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miFileInformation),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSave, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSaveAs),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miOpenReferenceFile, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miAddFromRefList),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miSaveReferenceFile),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miExcelExport),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miPrint),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miOpenReferenceFile, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miAddFromRefList),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miPrint, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miFileInformation),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miQuit, true),
|
||||
new DevExpress.XtraBars.LinkPersistInfo(this.miRecentFiles, true)});
|
||||
this.miFile.Name = "miFile";
|
||||
@@ -1224,6 +1221,13 @@
|
||||
this.miRestoreOriginal.Name = "miRestoreOriginal";
|
||||
this.miRestoreOriginal.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.miRestoreOriginal_ItemClick);
|
||||
//
|
||||
// miDeleteBackup
|
||||
//
|
||||
resources.ApplyResources(this.miDeleteBackup, "miDeleteBackup");
|
||||
this.miDeleteBackup.Id = 117;
|
||||
this.miDeleteBackup.Name = "miDeleteBackup";
|
||||
this.miDeleteBackup.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.miDeleteBackup_ItemClick);
|
||||
//
|
||||
// miFileInformation
|
||||
//
|
||||
resources.ApplyResources(this.miFileInformation, "miFileInformation");
|
||||
@@ -2222,13 +2226,6 @@
|
||||
//
|
||||
this.timerSelectFocusedRow.Tick += new System.EventHandler(this.timerSelectFocusedRow_Tick);
|
||||
//
|
||||
// miDeleteBackup
|
||||
//
|
||||
resources.ApplyResources(this.miDeleteBackup, "miDeleteBackup");
|
||||
this.miDeleteBackup.Id = 117;
|
||||
this.miDeleteBackup.Name = "miDeleteBackup";
|
||||
this.miDeleteBackup.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.miDeleteBackup_ItemClick);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
|
||||
@@ -2035,18 +2035,18 @@ namespace ChanSort.Ui
|
||||
{
|
||||
if (channel.IsDeleted || channel.NewProgramNr == -1)
|
||||
continue;
|
||||
sb.Append(list.ShortCaption).Append(sep);
|
||||
sb.Append(list.ShortCaption?.Replace("\0", "")).Append(sep);
|
||||
sb.Append(channel.NewProgramNr).Append(sep);
|
||||
sb.Append('"').Append(channel.Name).Append('"').Append(sep);
|
||||
sb.Append(channel.Name?.Replace("\0", "")).Append(sep);
|
||||
sb.Append(channel.Favorites).Append(sep);
|
||||
sb.Append(channel.Lock ? "L" : "").Append(sep);
|
||||
sb.Append(channel.Skip ? "S" : "").Append(sep);
|
||||
sb.Append(channel.Hidden ? "H" : "").Append(sep);
|
||||
sb.Append(channel.Encrypted == null ? "?" : channel.Encrypted.Value ? "C" : "").Append(sep);
|
||||
sb.Append('"').Append(channel.Satellite).Append('"').Append(sep);
|
||||
sb.Append(channel.Encrypted == true ? "C" : "").Append(sep);
|
||||
sb.Append(channel.Satellite?.Replace("\0", "")).Append(sep);
|
||||
sb.Append(channel.ChannelOrTransponder).Append(sep);
|
||||
sb.Append(channel.FreqInMhz).Append(sep);
|
||||
sb.Append(channel.Polarity).Append(sep);
|
||||
sb.Append(channel.Polarity == '\0' ? "" : channel.Polarity).Append(sep);
|
||||
sb.Append(channel.SymbolRate).Append(sep);
|
||||
sb.Append(channel.OriginalNetworkId).Append(sep);
|
||||
sb.Append(channel.TransportStreamId).Append(sep);
|
||||
@@ -2059,7 +2059,8 @@ namespace ChanSort.Ui
|
||||
}
|
||||
|
||||
Clipboard.Clear();
|
||||
Clipboard.SetData(DataFormats.Text, sb.ToString());
|
||||
Clipboard.SetText(sb.ToString());
|
||||
|
||||
XtraMessageBox.Show(this,
|
||||
Resources.MainForm_ExportExcelList_Message,
|
||||
this.miExcelExport.Caption,
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
<value>gridLeft</value>
|
||||
</data>
|
||||
<data name=">>gridLeft.Type" xml:space="preserve">
|
||||
<value>ChanSort.XGridControl, ChanSort, Version=1.0.8313.22695, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ChanSort.XGridControl, ChanSort, Version=1.0.8359.22033, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>gridLeft.Parent" xml:space="preserve">
|
||||
<value>grpOutputList</value>
|
||||
@@ -413,12 +413,6 @@
|
||||
<data name="miDeleteBackup.Caption" xml:space="preserve">
|
||||
<value>Delete backup files</value>
|
||||
</data>
|
||||
<data name="miFileInformation.Caption" xml:space="preserve">
|
||||
<value>File &information...</value>
|
||||
</data>
|
||||
<data name="miFileInformation.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="miSave.Caption" xml:space="preserve">
|
||||
<value>&Save</value>
|
||||
</data>
|
||||
@@ -431,15 +425,6 @@
|
||||
<data name="miSaveAs.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="miOpenReferenceFile.Caption" xml:space="preserve">
|
||||
<value>Apply order from a reference list...</value>
|
||||
</data>
|
||||
<data name="miOpenReferenceFile.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="miAddFromRefList.Caption" xml:space="preserve">
|
||||
<value>Add channels from reference list...</value>
|
||||
</data>
|
||||
<data name="miSaveReferenceFile.Caption" xml:space="preserve">
|
||||
<value>Save reference list...</value>
|
||||
</data>
|
||||
@@ -452,12 +437,27 @@
|
||||
<data name="miExcelExport.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="miOpenReferenceFile.Caption" xml:space="preserve">
|
||||
<value>Apply order from a reference list...</value>
|
||||
</data>
|
||||
<data name="miOpenReferenceFile.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="miAddFromRefList.Caption" xml:space="preserve">
|
||||
<value>Add channels from reference list...</value>
|
||||
</data>
|
||||
<data name="miPrint.Caption" xml:space="preserve">
|
||||
<value>&Print...</value>
|
||||
</data>
|
||||
<data name="miPrint.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name="miFileInformation.Caption" xml:space="preserve">
|
||||
<value>File &information...</value>
|
||||
</data>
|
||||
<data name="miFileInformation.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="miQuit.Caption" xml:space="preserve">
|
||||
<value>&Quit</value>
|
||||
</data>
|
||||
@@ -1240,7 +1240,7 @@
|
||||
<value>gviewLeft</value>
|
||||
</data>
|
||||
<data name=">>gviewLeft.Type" xml:space="preserve">
|
||||
<value>ChanSort.XGridView, ChanSort, Version=1.0.8313.22695, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ChanSort.XGridView, ChanSort, Version=1.0.8359.22033, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>colIndex1.Name" xml:space="preserve">
|
||||
<value>colIndex1</value>
|
||||
@@ -1324,13 +1324,13 @@
|
||||
<value>globalImageCollection1</value>
|
||||
</data>
|
||||
<data name=">>globalImageCollection1.Type" xml:space="preserve">
|
||||
<value>ChanSort.Ui.GlobalImageCollection, ChanSort, Version=1.0.8313.22695, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ChanSort.Ui.GlobalImageCollection, ChanSort, Version=1.0.8359.22033, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>gviewRight.Name" xml:space="preserve">
|
||||
<value>gviewRight</value>
|
||||
</data>
|
||||
<data name=">>gviewRight.Type" xml:space="preserve">
|
||||
<value>ChanSort.XGridView, ChanSort, Version=1.0.8313.22695, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ChanSort.XGridView, ChanSort, Version=1.0.8359.22033, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>colIndex.Name" xml:space="preserve">
|
||||
<value>colIndex</value>
|
||||
@@ -1572,6 +1572,12 @@
|
||||
<data name=">>miRestoreOriginal.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>miDeleteBackup.Name" xml:space="preserve">
|
||||
<value>miDeleteBackup</value>
|
||||
</data>
|
||||
<data name=">>miDeleteBackup.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>miFileInformation.Name" xml:space="preserve">
|
||||
<value>miFileInformation</value>
|
||||
</data>
|
||||
@@ -2094,12 +2100,6 @@
|
||||
<data name=">>timerSelectFocusedRow.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>miDeleteBackup.Name" xml:space="preserve">
|
||||
<value>miDeleteBackup</value>
|
||||
</data>
|
||||
<data name=">>miDeleteBackup.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MainForm</value>
|
||||
</data>
|
||||
@@ -2107,7 +2107,7 @@
|
||||
<value>DevExpress.XtraEditors.XtraForm, DevExpress.Utils.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="SharedImageCollection.Timestamp" type="System.DateTime, mscorlib">
|
||||
<value>10/05/2022 12:50:36</value>
|
||||
<value>11/20/2022 12:41:24</value>
|
||||
</data>
|
||||
<data name="SharedImageCollection.ImageSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
@@ -2997,7 +2997,7 @@
|
||||
<value>gridRight</value>
|
||||
</data>
|
||||
<data name=">>gridRight.Type" xml:space="preserve">
|
||||
<value>ChanSort.XGridControl, ChanSort, Version=1.0.8313.22695, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ChanSort.XGridControl, ChanSort, Version=1.0.8359.22033, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>gridRight.Parent" xml:space="preserve">
|
||||
<value>grpInputList</value>
|
||||
|
||||
@@ -1127,4 +1127,7 @@ This step can be repeated as needed.</value>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraEditors.XtraForm, DevExpress.Utils.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="checkEdit1.Properties.Caption" xml:space="preserve">
|
||||
<value>Data/Other</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
@@ -1,9 +1,19 @@
|
||||
ChanSort Change Log
|
||||
===================
|
||||
|
||||
2022-11-22
|
||||
- fixed "Export to Excel" (copies the list as tab-separated text into clipboard)
|
||||
- included latest translation to Polish (thanks to J.D.)
|
||||
- reorganized File menu and tool bar
|
||||
- allow renaming channels in SatcoDX channel lists (\*.sdx)
|
||||
- improved support for Panasonic LS 500 / LX 700 series
|
||||
|
||||
2022-11-14
|
||||
- fixed issue loading Loewe servicelist.xml file containing empty service-ids
|
||||
|
||||
2022-10-06
|
||||
- added support for Android based Panasonic LS and LX 500-700 series (lists with a /mnt/.../tv.db file)
|
||||
- fixed reference list dialog now showing any controls on small screens with and large scaling factor
|
||||
- fixed reference list dialog not showing any controls on small screens with and large scaling factor
|
||||
- fixed "NullReferenceException" while applying a reference list based on a SQLite database file
|
||||
(\*.db or Samsung .zip) which contained NULL values for channel names instead of empty strings.
|
||||
- function to remove backup files (so that the next "File / Save" operation will create a new backup)
|
||||
|
||||
Reference in New Issue
Block a user