Files
ChanSort/source/ChanSort.Loader.CmdbBin/CmdbPlugin.cs
Horst Beham c609b9b40c - fixed support for Dijitsu channel lists with missing atv\_cmdb\_2.bin file
- experimental support for Metz channel\_list.xml lists
2024-02-25 17:59:34 +01:00

26 lines
728 B
C#

using System.IO;
using ChanSort.Api;
namespace ChanSort.Loader.CmdbBin
{
public class CmdbPlugin : ISerializerPlugin
{
public string DllName { get; set; }
public string PluginName => "cmdb .bin";
public string FileFilter => "*.bin";
public SerializerBase CreateSerializer(string inputFile)
{
var dir = Path.GetDirectoryName(inputFile);
// ignore Philips ChannelMap_100 channel lists which don't have atv_cmdb.bin and dtv_cmdb_2.bin in the same folder
var anchorFile = Path.Combine(dir, "dtv_cmdb_2.bin");
if (File.Exists(anchorFile) || File.Exists(Path.Combine(dir, "atv_cmdb.bin")))
return new CmdbFileSerializer(anchorFile);
return null;
}
}
}