52 lines
1.6 KiB
C#
Raw Normal View History

2019-02-21 01:57:43 -08:00
using System;
using System.Collections.Generic;
2021-12-13 16:58:05 -07:00
using System.Globalization;
2022-04-29 23:52:50 -05:00
using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
2019-02-21 01:57:43 -08:00
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
2022-04-29 23:52:50 -05:00
namespace ConfusedPolarBear.Plugin.IntroSkipper;
2021-12-13 16:58:05 -07:00
/// <summary>
/// The main plugin.
/// </summary>
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
2019-02-21 01:57:43 -08:00
{
2021-12-13 16:58:05 -07:00
/// <summary>
/// Initializes a new instance of the <see cref="Plugin"/> class.
/// </summary>
/// <param name="applicationPaths">Instance of the <see cref="IApplicationPaths"/> interface.</param>
/// <param name="xmlSerializer">Instance of the <see cref="IXmlSerializer"/> interface.</param>
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
2019-02-21 01:57:43 -08:00
{
2021-12-13 16:58:05 -07:00
Instance = this;
}
2021-12-13 16:58:05 -07:00
/// <inheritdoc />
2022-04-29 23:52:50 -05:00
public override string Name => "Intro Skipper";
2021-12-13 16:58:05 -07:00
/// <inheritdoc />
2022-04-29 23:52:50 -05:00
public override Guid Id => Guid.Parse("c83d86bb-a1e0-4c35-a113-e2101cf4ee6b");
2019-02-21 01:57:43 -08:00
2021-12-13 16:58:05 -07:00
/// <summary>
/// Gets the current plugin instance.
/// </summary>
public static Plugin? Instance { get; private set; }
2019-02-21 01:57:43 -08:00
2021-12-13 16:58:05 -07:00
/// <inheritdoc />
public IEnumerable<PluginPageInfo> GetPages()
{
return new[]
2019-02-21 01:57:43 -08:00
{
2021-12-13 16:58:05 -07:00
new PluginPageInfo
2019-02-21 01:57:43 -08:00
{
2021-12-13 16:58:05 -07:00
Name = this.Name,
EmbeddedResourcePath = string.Format(CultureInfo.InvariantCulture, "{0}.Configuration.configPage.html", GetType().Namespace)
}
};
2019-02-21 01:57:43 -08:00
}
2019-03-10 08:53:30 +09:00
}