removed the IsCorePlugin property
This commit is contained in:
parent
bf9e24502c
commit
bf95cfe2e5
|
@ -115,7 +115,6 @@
|
||||||
<Compile Include="UserLibrary\UserLibraryService.cs" />
|
<Compile Include="UserLibrary\UserLibraryService.cs" />
|
||||||
<Compile Include="UserLibrary\YearsService.cs" />
|
<Compile Include="UserLibrary\YearsService.cs" />
|
||||||
<Compile Include="UserService.cs" />
|
<Compile Include="UserService.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="WeatherService.cs" />
|
<Compile Include="WeatherService.cs" />
|
||||||
<Compile Include="WebSocket\LogFileWebSocketListener.cs" />
|
<Compile Include="WebSocket\LogFileWebSocketListener.cs" />
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
using MediaBrowser.Common.Kernel;
|
|
||||||
using MediaBrowser.Common.Plugins;
|
|
||||||
using MediaBrowser.Model.Plugins;
|
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Api
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Class Plugin
|
|
||||||
/// </summary>
|
|
||||||
public class Plugin : BasePlugin<BasePluginConfiguration>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="Plugin" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="appPaths">The app paths.</param>
|
|
||||||
/// <param name="xmlSerializer">The XML serializer.</param>
|
|
||||||
public Plugin(IApplicationPaths appPaths, IXmlSerializer xmlSerializer)
|
|
||||||
: base(appPaths, xmlSerializer)
|
|
||||||
{
|
|
||||||
Instance = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name of the plugin
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public override string Name
|
|
||||||
{
|
|
||||||
get { return "Web Api"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is a core plugin.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is a core plugin; otherwise, <c>false</c>.</value>
|
|
||||||
public override bool IsCorePlugin
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the instance.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The instance.</value>
|
|
||||||
public static Plugin Instance { get; private set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -43,18 +43,6 @@ namespace MediaBrowser.Common.Plugins
|
||||||
get { return string.Empty; }
|
get { return string.Empty; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is a core plugin.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is a core plugin; otherwise, <c>false</c>.</value>
|
|
||||||
public virtual bool IsCorePlugin
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this instance is first run.
|
/// Gets a value indicating whether this instance is first run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -316,7 +304,6 @@ namespace MediaBrowser.Common.Plugins
|
||||||
AssemblyFileName = AssemblyFileName,
|
AssemblyFileName = AssemblyFileName,
|
||||||
ConfigurationDateLastModified = ConfigurationDateLastModified,
|
ConfigurationDateLastModified = ConfigurationDateLastModified,
|
||||||
Description = Description,
|
Description = Description,
|
||||||
IsCorePlugin = IsCorePlugin,
|
|
||||||
Id = Id,
|
Id = Id,
|
||||||
EnableAutoUpdate = Configuration.EnableAutoUpdate,
|
EnableAutoUpdate = Configuration.EnableAutoUpdate,
|
||||||
UpdateClass = Configuration.UpdateClass,
|
UpdateClass = Configuration.UpdateClass,
|
||||||
|
|
|
@ -20,12 +20,6 @@ namespace MediaBrowser.Common.Plugins
|
||||||
/// <value>The description.</value>
|
/// <value>The description.</value>
|
||||||
string Description { get; }
|
string Description { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is a core plugin.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is a core plugin; otherwise, <c>false</c>.</value>
|
|
||||||
bool IsCorePlugin { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of configuration this plugin uses
|
/// Gets the type of configuration this plugin uses
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -59,13 +59,6 @@ namespace MediaBrowser.Model.Plugins
|
||||||
[ProtoMember(7)]
|
[ProtoMember(7)]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is core plugin.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is core plugin; otherwise, <c>false</c>.</value>
|
|
||||||
[ProtoMember(8)]
|
|
||||||
public bool IsCorePlugin { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique id.
|
/// Gets or sets the unique id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -445,11 +445,6 @@ namespace MediaBrowser.Server.Implementations.Updates
|
||||||
/// <exception cref="System.ArgumentException"></exception>
|
/// <exception cref="System.ArgumentException"></exception>
|
||||||
public void UninstallPlugin(IPlugin plugin)
|
public void UninstallPlugin(IPlugin plugin)
|
||||||
{
|
{
|
||||||
if (plugin.IsCorePlugin)
|
|
||||||
{
|
|
||||||
throw new ArgumentException(string.Format("{0} cannot be uninstalled because it is a core plugin.", plugin.Name));
|
|
||||||
}
|
|
||||||
|
|
||||||
plugin.OnUninstalling();
|
plugin.OnUninstalling();
|
||||||
|
|
||||||
// Remove it the quick way for now
|
// Remove it the quick way for now
|
||||||
|
|
|
@ -12,11 +12,6 @@
|
||||||
|
|
||||||
loadPlugins: function (plugins) {
|
loadPlugins: function (plugins) {
|
||||||
|
|
||||||
plugins = plugins.filter(function (p) {
|
|
||||||
|
|
||||||
return !p.IsCorePlugin;
|
|
||||||
});
|
|
||||||
|
|
||||||
var elem = $('#tbodyPluginUpdates', $.mobile.activePage).html('');
|
var elem = $('#tbodyPluginUpdates', $.mobile.activePage).html('');
|
||||||
|
|
||||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
for (var i = 0, length = plugins.length; i < length; i++) {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
plugins = plugins.sort(function (plugin1, plugin2) {
|
plugins = plugins.sort(function (plugin1, plugin2) {
|
||||||
|
|
||||||
return (plugin1.IsCorePlugin.toString() + plugin1.Name) > (plugin2.IsCorePlugin.toString() + plugin2.Name) ? 1 : -1;
|
return (plugin1.Name) > (plugin2.Name) ? 1 : -1;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -35,10 +35,6 @@
|
||||||
|
|
||||||
var plugin = plugins[i];
|
var plugin = plugins[i];
|
||||||
|
|
||||||
if (plugin.IsCorePlugin) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
|
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
|
||||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||||
})[0];
|
})[0];
|
||||||
|
@ -55,9 +51,7 @@
|
||||||
|
|
||||||
html += "</a>";
|
html += "</a>";
|
||||||
|
|
||||||
if (!plugin.IsCorePlugin) {
|
html += "<a data-id='" + plugin.Id + "' data-pluginname='" + plugin.Name + "' onclick='PluginsPage.deletePlugin(this);' href='#'>Delete</a>";
|
||||||
html += "<a data-id='" + plugin.Id + "' data-pluginname='" + plugin.Name + "' onclick='PluginsPage.deletePlugin(this);' href='#'>Delete</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
html += "</li>";
|
html += "</li>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user