mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
moved Plugins to separate repo
This commit is contained in:
@@ -182,8 +182,8 @@ namespace MediaBrowser.Controller
|
||||
/// Gets the list of plugin configuration pages
|
||||
/// </summary>
|
||||
/// <value>The configuration pages.</value>
|
||||
[ImportMany(typeof(BaseConfigurationPage))]
|
||||
public IEnumerable<BaseConfigurationPage> PluginConfigurationPages { get; private set; }
|
||||
[ImportMany(typeof(IPluginConfigurationPage))]
|
||||
public IEnumerable<IPluginConfigurationPage> PluginConfigurationPages { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the intro providers.
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
<Compile Include="Persistence\IUserRepository.cs" />
|
||||
<Compile Include="Persistence\TypeMapper.cs" />
|
||||
<Compile Include="Playback\IIntroProvider.cs" />
|
||||
<Compile Include="Plugins\BaseConfigurationPage.cs" />
|
||||
<Compile Include="Plugins\IPluginConfigurationPage.cs" />
|
||||
<Compile Include="Plugins\PluginSecurityManager.cs" />
|
||||
<Compile Include="Providers\FanartBaseProvider.cs" />
|
||||
<Compile Include="Providers\BaseImageEnhancer.cs" />
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BaseConfigurationPage
|
||||
/// </summary>
|
||||
public abstract class BaseConfigurationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public abstract string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
public virtual string Description
|
||||
{
|
||||
get { return string.Empty; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the configuration page.
|
||||
/// </summary>
|
||||
/// <value>The type of the configuration page.</value>
|
||||
public virtual ConfigurationPageType ConfigurationPageType
|
||||
{
|
||||
get { return ConfigurationPageType.PluginConfiguration; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HTML stream from manifest resource.
|
||||
/// </summary>
|
||||
/// <param name="resource">The resource.</param>
|
||||
/// <returns>Stream.</returns>
|
||||
protected Stream GetHtmlStreamFromManifestResource(string resource)
|
||||
{
|
||||
return GetType().Assembly.GetManifestResourceStream(resource);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HTML stream.
|
||||
/// </summary>
|
||||
/// <returns>Stream.</returns>
|
||||
public abstract Stream GetHtmlStream();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the plugin.
|
||||
/// </summary>
|
||||
/// <value>The name of the plugin.</value>
|
||||
public virtual string OwnerPluginName
|
||||
{
|
||||
get { return GetOwnerPlugin().Name; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the owner plugin.
|
||||
/// </summary>
|
||||
/// <returns>BasePlugin.</returns>
|
||||
public abstract IPlugin GetOwnerPlugin();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum ConfigurationPageType
|
||||
/// </summary>
|
||||
public enum ConfigurationPageType
|
||||
{
|
||||
/// <summary>
|
||||
/// The plugin configuration
|
||||
/// </summary>
|
||||
PluginConfiguration,
|
||||
/// <summary>
|
||||
/// The none
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
}
|
||||
61
MediaBrowser.Controller/Plugins/IPluginConfigurationPage.cs
Normal file
61
MediaBrowser.Controller/Plugins/IPluginConfigurationPage.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IConfigurationPage
|
||||
/// </summary>
|
||||
public interface IPluginConfigurationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the configuration page.
|
||||
/// </summary>
|
||||
/// <value>The type of the configuration page.</value>
|
||||
ConfigurationPageType ConfigurationPageType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the plugin id.
|
||||
/// </summary>
|
||||
/// <value>The plugin id.</value>
|
||||
Guid? PluginId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HTML stream.
|
||||
/// </summary>
|
||||
/// <returns>Stream.</returns>
|
||||
Stream GetHtmlStream();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version. Typically taken from Plugin.Version
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
string Version { get; }
|
||||
|
||||
/// <summary>
|
||||
/// For http caching purposes. Typically taken from Plugin.AssemblyDateLastModified
|
||||
/// </summary>
|
||||
DateTime DateLastModified { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum ConfigurationPageType
|
||||
/// </summary>
|
||||
public enum ConfigurationPageType
|
||||
{
|
||||
/// <summary>
|
||||
/// The plugin configuration
|
||||
/// </summary>
|
||||
PluginConfiguration,
|
||||
/// <summary>
|
||||
/// The none
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user