mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-20 22:32:04 +01:00
- opening MtkChannelList.xml in a Philips directory structure now loads the whole Philips list instead of just MtkChannelList.xml
- Philips list versions 120 and 125 are now read-only because the TV ignores changes to the main channel numbers. Only favorite lists are imported correctly
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ source/ChanSort.opensdf
|
||||
/source/.vs/
|
||||
/source/packages/
|
||||
/source/ChanSort.Loader.PhilipsBin/DllClient.cs
|
||||
/source/ChanSort.Loader.MediaTek/.vs/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using ChanSort.Api;
|
||||
|
||||
namespace ChanSort.Loader.MediaTek;
|
||||
@@ -6,16 +7,16 @@ namespace ChanSort.Loader.MediaTek;
|
||||
public class MediatekPlugin : ISerializerPlugin
|
||||
{
|
||||
public string DllName { get; set; }
|
||||
public string PluginName => "MediaTek (MtkChannelList.xml)";
|
||||
public string PluginName => "MediaTek (Mtk*.xml)";
|
||||
public string FileFilter => "Mtk*.xml";
|
||||
|
||||
public SerializerBase CreateSerializer(string inputFile)
|
||||
{
|
||||
var dir = Path.GetDirectoryName(inputFile);
|
||||
var dir = Path.GetDirectoryName(inputFile) ?? "";
|
||||
|
||||
// if there is a chanLst.bin file, let the Philips module handle the channel list
|
||||
//if (File.Exists(Path.Combine(dir, "chanLst.bin")))
|
||||
// return null;
|
||||
if (StringComparer.InvariantCultureIgnoreCase.Equals(Path.GetFileName(inputFile), "MtkChannelList.xml") && File.Exists(Path.Combine(dir, "chanLst.bin")))
|
||||
return null;
|
||||
|
||||
return new Serializer(inputFile);
|
||||
}
|
||||
|
||||
@@ -227,6 +227,16 @@ namespace ChanSort.Loader.Philips
|
||||
throw LoaderException.TryNext("No XML files found in folder structure");
|
||||
|
||||
LoadAndValidateMtkChannelList(dir);
|
||||
|
||||
// version 120 and 125 ignore the modified main channel numbers and only take changes from the favorites.xml
|
||||
if ((chanLstBin?.VersionMajor ?? 0) >= 120)
|
||||
{
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
{
|
||||
if (!list.IsMixedSourceFavoritesList)
|
||||
list.ReadOnly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -718,8 +728,12 @@ namespace ChanSort.Loader.Philips
|
||||
if (others.Count == 0)
|
||||
throw LoaderException.Fail("MtkChannelList.xml doesn't contain a matching channel for " + ch1);
|
||||
if (others.Count > 1)
|
||||
throw LoaderException.Fail("MtkChannelList.xml contains multiple matching channel for " + ch1);
|
||||
|
||||
{
|
||||
others = others.Where(c => c.OldProgramNr == ch1.OldProgramNr).ToList();
|
||||
if (others.Count != 1)
|
||||
throw LoaderException.Fail("MtkChannelList.xml contains multiple matching channel for " + ch1);
|
||||
}
|
||||
|
||||
var ch2 = others[0];
|
||||
if (ch1.OldProgramNr != ch2.OldProgramNr)
|
||||
throw LoaderException.Fail("MtkChannelList.xml contains a different channel number for " + ch1);
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
ChanSort Change Log
|
||||
===================
|
||||
|
||||
2024-10-15
|
||||
- Philips formats 120-125: opening the "MtkChannelList.xml" file will now load/save the whole Philips channel list
|
||||
instead of only loading the data from that particular file.
|
||||
- Philips formats 120-125: the main program numbers are now read-only because the TV seems to ignores changes to them.
|
||||
Changes to the favorite lists however are imported correctly.
|
||||
|
||||
2024-10-02
|
||||
- Philips formats 100-125: further improvements/fixes for decoding non-latin characters
|
||||
- Sony Bravia 7 (2024) sdb.xml: support to read it as a reference list (the TV will ignore any edits to this file)
|
||||
|
||||
Reference in New Issue
Block a user