mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Added plugin configuration downloading
This commit is contained in:
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>
|
/// <summary>
|
||||||
/// Gets the path to the assembly file
|
/// Gets the path to the assembly file
|
||||||
@ -192,7 +207,8 @@ namespace MediaBrowser.Common.Plugins
|
|||||||
Configuration = XmlSerializer.DeserializeFromFile(ConfigurationType, ConfigurationFilePath) as BasePluginConfiguration;
|
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;
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using MediaBrowser.Common.Kernel;
|
using MediaBrowser.Common.Kernel;
|
||||||
using MediaBrowser.Common.Logging;
|
using MediaBrowser.Common.Logging;
|
||||||
using MediaBrowser.Model.Progress;
|
using MediaBrowser.Model.Progress;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Security;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Common.UI
|
namespace MediaBrowser.Common.UI
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user