- 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:
Horst Beham
2024-10-15 10:37:57 +02:00
parent 1904e97d64
commit 4eb78e1ca8
4 changed files with 29 additions and 7 deletions

View File

@@ -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);
}