#region ========================================================================= USING =====================================================================================
using Nemera.Plugins.Contracts.Common.Models.DTO.Settings;
using Nemera.Plugins.Contracts.Core.Plugins;
using Nemera.Plugins.Calibre.Common.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
#endregion
namespace Nemera.Plugins.Calibre.Core;
///
/// Plugin that provides book metadata and book covers from Calibre OPF files.
///
public sealed class CalibrePlugin : IPlugin, IPluginServiceRegistrator
{
///
/// The unique identifier of the plugin.
///
public static readonly Guid s_pluginId = new("a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d");
///
/// Gets the unique identifier of the plugin.
///
public Guid Id => s_pluginId;
///
/// Gets the display name of the plugin.
///
public string Name => "Calibre Metadata";
///
/// Gets the author of the plugin.
///
public string Author => "Nemera";
///
/// Gets the version of the plugin.
///
public Version Version => new(1, 0, 0);
///
/// Gets the description of the plugin.
///
public string Description => "Reads book metadata and covers from the OPF files of a Calibre library.";
///
/// Gets the settings schema of the plugin.
///
/// The settings descriptors of the plugin.
public IReadOnlyList GetSettingsSchema()
{
return [];
}
///
/// Registers the services required by the plugin.
///
/// The service collection to register the services into.
public void RegisterServices(IServiceCollection services)
{
services.AddCalibreBookMetadataProvider(pluginId: Id);
services.AddCalibreArtworkProvider(pluginId: Id);
}
}