aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2013-03-14 12:40:36 -0400
committerEric Reed <ebr@mediabrowser3.com>2013-03-14 12:40:36 -0400
commita7f06c84b14ea79ce5af8e928597f6fd119088a3 (patch)
tree8da2780a6bd857b719d355ed9cc441ef17609a1d /MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
parentd3b37a73cc32d654fa823d9b2e8b31ff470ebffd (diff)
Hook new registration load to changing supporter keys
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs')
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index beca1637d..c345e122f 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -73,9 +73,9 @@ namespace MediaBrowser.Common.Implementations.Security
{
var tasks = new List<Task>();
+ ResetSupporterInfo();
tasks.AddRange(_registeredEntities.Select(i => i.LoadRegistrationInfoAsync()));
await Task.WhenAll(tasks);
- ResetSupporterInfo();
}
/// <summary>
@@ -101,11 +101,8 @@ namespace MediaBrowser.Common.Implementations.Security
if (value != MBRegistration.SupporterKey)
{
MBRegistration.SupporterKey = value;
- // Clear this so it will re-evaluate
- ResetSupporterInfo();
- // And we'll need to restart to re-evaluate the status of plug-ins
- _appHost.NotifyPendingRestart();
-
+ // re-load registration info
+ Task.Run(() => LoadAllRegistrationInfo());
}
}
}
@@ -119,9 +116,12 @@ namespace MediaBrowser.Common.Implementations.Security
get { return MBRegistration.LegacyKey; }
set
{
- MBRegistration.LegacyKey = value;
- // And we'll need to restart to re-evaluate the status of plug-ins
- _appHost.NotifyPendingRestart();
+ if (value != MBRegistration.LegacyKey)
+ {
+ MBRegistration.LegacyKey = value;
+ // re-load registration info
+ Task.Run(() => LoadAllRegistrationInfo());
+ }
}
}