mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-12 02:12:03 +01:00
26 lines
728 B
C#
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;
|
|
}
|
|
}
|
|
}
|