removed the IsCorePlugin property

This commit is contained in:
LukePulverenti 2013-03-04 23:29:43 -05:00
parent bf9e24502c
commit bf95cfe2e5
8 changed files with 2 additions and 97 deletions

View File

@ -115,7 +115,6 @@
<Compile Include="UserLibrary\UserLibraryService.cs" />
<Compile Include="UserLibrary\YearsService.cs" />
<Compile Include="UserService.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WeatherService.cs" />
<Compile Include="WebSocket\LogFileWebSocketListener.cs" />

View File

@ -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; }
}
}

View File

@ -43,18 +43,6 @@ namespace MediaBrowser.Common.Plugins
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>
/// Gets a value indicating whether this instance is first run.
/// </summary>
@ -316,7 +304,6 @@ namespace MediaBrowser.Common.Plugins
AssemblyFileName = AssemblyFileName,
ConfigurationDateLastModified = ConfigurationDateLastModified,
Description = Description,
IsCorePlugin = IsCorePlugin,
Id = Id,
EnableAutoUpdate = Configuration.EnableAutoUpdate,
UpdateClass = Configuration.UpdateClass,

View File

@ -20,12 +20,6 @@ namespace MediaBrowser.Common.Plugins
/// <value>The description.</value>
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>
/// Gets the type of configuration this plugin uses
/// </summary>

View File

@ -59,13 +59,6 @@ namespace MediaBrowser.Model.Plugins
[ProtoMember(7)]
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>
/// Gets or sets the unique id.
/// </summary>

View File

@ -445,11 +445,6 @@ namespace MediaBrowser.Server.Implementations.Updates
/// <exception cref="System.ArgumentException"></exception>
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();
// Remove it the quick way for now

View File

@ -12,11 +12,6 @@
loadPlugins: function (plugins) {
plugins = plugins.filter(function (p) {
return !p.IsCorePlugin;
});
var elem = $('#tbodyPluginUpdates', $.mobile.activePage).html('');
for (var i = 0, length = plugins.length; i < length; i++) {

View File

@ -25,7 +25,7 @@
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];
if (plugin.IsCorePlugin) {
continue;
}
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
return pluginConfigurationPage.PluginId == plugin.Id;
})[0];
@ -55,9 +51,7 @@
html += "</a>";
if (!plugin.IsCorePlugin) {
html += "<a data-id='" + plugin.Id + "' data-pluginname='" + plugin.Name + "' onclick='PluginsPage.deletePlugin(this);' href='#'>Delete</a>";
}
html += "</li>";
}