Jelajahi Sumber

added back IsFirstRun

Luke Pulverenti 12 tahun lalu
induk
melakukan
5e1f4c01b8

+ 6 - 1
MediaBrowser.Common/Plugins/BasePlugin.cs

@@ -34,6 +34,12 @@ namespace MediaBrowser.Common.Plugins
         /// <value>The name.</value>
         /// <value>The name.</value>
         public abstract string Name { get; }
         public abstract string Name { get; }
 
 
+        /// <summary>
+        /// Gets a value indicating whether this instance is first run.
+        /// </summary>
+        /// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
+        public bool IsFirstRun { get; private set; }
+
         /// <summary>
         /// <summary>
         /// Gets the description.
         /// Gets the description.
         /// </summary>
         /// </summary>
@@ -257,7 +263,6 @@ namespace MediaBrowser.Common.Plugins
         /// <summary>
         /// <summary>
         /// Saves the current configuration to the file system
         /// Saves the current configuration to the file system
         /// </summary>
         /// </summary>
-        /// <exception cref="System.InvalidOperationException">Cannot call Plugin.SaveConfiguration from the UI.</exception>
         public virtual void SaveConfiguration()
         public virtual void SaveConfiguration()
         {
         {
             lock (_configurationSaveLock)
             lock (_configurationSaveLock)

+ 6 - 0
MediaBrowser.Common/Plugins/IPlugin.cs

@@ -44,6 +44,12 @@ namespace MediaBrowser.Common.Plugins
         /// <value>The name of the assembly file.</value>
         /// <value>The name of the assembly file.</value>
         string AssemblyFileName { get; }
         string AssemblyFileName { get; }
 
 
+        /// <summary>
+        /// Gets a value indicating whether this instance is first run.
+        /// </summary>
+        /// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
+        bool IsFirstRun { get; }
+
         /// <summary>
         /// <summary>
         /// Gets the last date modified of the configuration
         /// Gets the last date modified of the configuration
         /// </summary>
         /// </summary>