From bf95cfe2e50517df46e6f849aba58b6fed2141c7 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Mon, 4 Mar 2013 23:29:43 -0500 Subject: [PATCH] removed the IsCorePlugin property --- MediaBrowser.Api/MediaBrowser.Api.csproj | 1 - MediaBrowser.Api/Plugin.cs | 52 ------------------- MediaBrowser.Common/Plugins/BasePlugin.cs | 13 ----- MediaBrowser.Common/Plugins/IPlugin.cs | 6 --- MediaBrowser.Model/Plugins/PluginInfo.cs | 7 --- .../Updates/InstallationManager.cs | 5 -- .../Html/scripts/PluginUpdatesPage.js | 5 -- .../Html/scripts/PluginsPage.js | 10 +--- 8 files changed, 2 insertions(+), 97 deletions(-) delete mode 100644 MediaBrowser.Api/Plugin.cs diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index 44e7947e2..c7bba4e9a 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -115,7 +115,6 @@ - diff --git a/MediaBrowser.Api/Plugin.cs b/MediaBrowser.Api/Plugin.cs deleted file mode 100644 index 321267b04..000000000 --- a/MediaBrowser.Api/Plugin.cs +++ /dev/null @@ -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 -{ - /// - /// Class Plugin - /// - public class Plugin : BasePlugin - { - /// - /// Initializes a new instance of the class. - /// - /// The app paths. - /// The XML serializer. - public Plugin(IApplicationPaths appPaths, IXmlSerializer xmlSerializer) - : base(appPaths, xmlSerializer) - { - Instance = this; - } - - /// - /// Gets the name of the plugin - /// - /// The name. - public override string Name - { - get { return "Web Api"; } - } - - /// - /// Gets a value indicating whether this instance is a core plugin. - /// - /// true if this instance is a core plugin; otherwise, false. - public override bool IsCorePlugin - { - get - { - return true; - } - } - - /// - /// Gets the instance. - /// - /// The instance. - public static Plugin Instance { get; private set; } - } -} diff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.cs index 4cff2eeb9..9c4a8e8ff 100644 --- a/MediaBrowser.Common/Plugins/BasePlugin.cs +++ b/MediaBrowser.Common/Plugins/BasePlugin.cs @@ -43,18 +43,6 @@ namespace MediaBrowser.Common.Plugins get { return string.Empty; } } - /// - /// Gets a value indicating whether this instance is a core plugin. - /// - /// true if this instance is a core plugin; otherwise, false. - public virtual bool IsCorePlugin - { - get - { - return false; - } - } - /// /// Gets a value indicating whether this instance is first run. /// @@ -316,7 +304,6 @@ namespace MediaBrowser.Common.Plugins AssemblyFileName = AssemblyFileName, ConfigurationDateLastModified = ConfigurationDateLastModified, Description = Description, - IsCorePlugin = IsCorePlugin, Id = Id, EnableAutoUpdate = Configuration.EnableAutoUpdate, UpdateClass = Configuration.UpdateClass, diff --git a/MediaBrowser.Common/Plugins/IPlugin.cs b/MediaBrowser.Common/Plugins/IPlugin.cs index ace82d83f..12aaa3fe7 100644 --- a/MediaBrowser.Common/Plugins/IPlugin.cs +++ b/MediaBrowser.Common/Plugins/IPlugin.cs @@ -20,12 +20,6 @@ namespace MediaBrowser.Common.Plugins /// The description. string Description { get; } - /// - /// Gets a value indicating whether this instance is a core plugin. - /// - /// true if this instance is a core plugin; otherwise, false. - bool IsCorePlugin { get; } - /// /// Gets the type of configuration this plugin uses /// diff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/Plugins/PluginInfo.cs index 0fe6fb6db..4aa5f5a5c 100644 --- a/MediaBrowser.Model/Plugins/PluginInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginInfo.cs @@ -59,13 +59,6 @@ namespace MediaBrowser.Model.Plugins [ProtoMember(7)] public string Description { get; set; } - /// - /// Gets or sets a value indicating whether this instance is core plugin. - /// - /// true if this instance is core plugin; otherwise, false. - [ProtoMember(8)] - public bool IsCorePlugin { get; set; } - /// /// Gets or sets the unique id. /// diff --git a/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs index bfba00a8c..e17ed0301 100644 --- a/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs +++ b/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs @@ -445,11 +445,6 @@ namespace MediaBrowser.Server.Implementations.Updates /// 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 diff --git a/MediaBrowser.WebDashboard/Html/scripts/PluginUpdatesPage.js b/MediaBrowser.WebDashboard/Html/scripts/PluginUpdatesPage.js index a89169c53..56bc6b4cf 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/PluginUpdatesPage.js +++ b/MediaBrowser.WebDashboard/Html/scripts/PluginUpdatesPage.js @@ -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++) { diff --git a/MediaBrowser.WebDashboard/Html/scripts/PluginsPage.js b/MediaBrowser.WebDashboard/Html/scripts/PluginsPage.js index e9098427d..c8ffe02d8 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/PluginsPage.js +++ b/MediaBrowser.WebDashboard/Html/scripts/PluginsPage.js @@ -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 += ""; - if (!plugin.IsCorePlugin) { - html += "Delete"; - } + html += "Delete"; html += ""; }