Files
ChanSort/source/ChanSort.Loader.MediaTek/MediatekPlugin.cs
Horst Beham 4eb78e1ca8 - 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
2024-10-15 10:37:57 +02:00

23 lines
701 B
C#

using System;
using System.IO;
using ChanSort.Api;
namespace ChanSort.Loader.MediaTek;
public class MediatekPlugin : ISerializerPlugin
{
public string DllName { get; set; }
public string PluginName => "MediaTek (Mtk*.xml)";
public string FileFilter => "Mtk*.xml";
public SerializerBase CreateSerializer(string inputFile)
{
var dir = Path.GetDirectoryName(inputFile) ?? "";
// if there is a chanLst.bin file, let the Philips module handle the channel list
if (StringComparer.InvariantCultureIgnoreCase.Equals(Path.GetFileName(inputFile), "MtkChannelList.xml") && File.Exists(Path.Combine(dir, "chanLst.bin")))
return null;
return new Serializer(inputFile);
}
}