using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Globalization;
using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
///
/// The main plugin.
///
public class Plugin : BasePlugin, IHasWebPages
{
///
/// Results of fingerprinting all episodes.
///
public Dictionary Intros { get; }
///
/// Map of season ids to episodes that have been queued for fingerprinting.
///
public Dictionary> AnalysisQueue { get; }
///
/// Total number of episodes in the queue.
///
public int TotalQueued { get; set; }
///
/// Initializes a new instance of the class.
///
/// Instance of the interface.
/// Instance of the interface.
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Intros = new Dictionary();
AnalysisQueue = new Dictionary>();
Instance = this;
}
///
public override string Name => "Intro Skipper";
///
public override Guid Id => Guid.Parse("c83d86bb-a1e0-4c35-a113-e2101cf4ee6b");
///
/// Gets the current plugin instance.
///
public static Plugin? Instance { get; private set; }
///
public IEnumerable GetPages()
{
return new[]
{
new PluginPageInfo
{
Name = this.Name,
EmbeddedResourcePath = string.Format(CultureInfo.InvariantCulture, "{0}.Configuration.configPage.html", GetType().Namespace)
}
};
}
}