Added plugin configuration downloading

pull/702/head
LukePulverenti Luke Pulverenti luke pulverenti 12 years ago
parent fc735e9187
commit 26db4b2cd9

@ -74,7 +74,22 @@ namespace MediaBrowser.Common.Plugins
}
}
public DateTime ConfigurationDateLastModified { get; private set; }
private DateTime? _ConfigurationDateLastModified = null;
public DateTime ConfigurationDateLastModified
{
get
{
if (_ConfigurationDateLastModified == null)
{
if (File.Exists(ConfigurationFilePath))
{
_ConfigurationDateLastModified = File.GetLastWriteTime(ConfigurationFilePath);
}
}
return _ConfigurationDateLastModified ?? DateTime.MinValue;
}
}
/// <summary>
/// Gets the path to the assembly file
@ -192,7 +207,8 @@ namespace MediaBrowser.Common.Plugins
Configuration = XmlSerializer.DeserializeFromFile(ConfigurationType, ConfigurationFilePath) as BasePluginConfiguration;
}
ConfigurationDateLastModified = File.GetLastWriteTime(ConfigurationFilePath);
// Reset this so it will be loaded again next time it's accessed
_ConfigurationDateLastModified = null;
}
}
}

@ -1,12 +1,8 @@
using System;
using System.Reflection;
using System.Windows;
using System.Windows.Media.Imaging;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Logging;
using MediaBrowser.Model.Progress;
using System.Runtime.InteropServices;
using System.Security;
namespace MediaBrowser.Common.UI
{

Loading…
Cancel
Save