|
|
@ -129,15 +129,28 @@ namespace MediaBrowser.Server.Implementations.IO
|
|
|
|
/// <param name="sender">The source of the event.</param>
|
|
|
|
/// <param name="sender">The source of the event.</param>
|
|
|
|
/// <param name="e">The <see cref="PowerModeChangedEventArgs"/> instance containing the event data.</param>
|
|
|
|
/// <param name="e">The <see cref="PowerModeChangedEventArgs"/> instance containing the event data.</param>
|
|
|
|
void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
|
|
|
void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Restart();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Restart()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Stop();
|
|
|
|
Stop();
|
|
|
|
Start();
|
|
|
|
Start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (ConfigurationManager.Configuration.EnableRealtimeMonitor)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
StartInternal();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Starts this instance.
|
|
|
|
/// Starts this instance.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public void Start()
|
|
|
|
private void StartInternal()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LibraryManager.ItemAdded += LibraryManager_ItemAdded;
|
|
|
|
LibraryManager.ItemAdded += LibraryManager_ItemAdded;
|
|
|
|
LibraryManager.ItemRemoved += LibraryManager_ItemRemoved;
|
|
|
|
LibraryManager.ItemRemoved += LibraryManager_ItemRemoved;
|
|
|
@ -359,7 +372,7 @@ namespace MediaBrowser.Server.Implementations.IO
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw new ArgumentNullException("path");
|
|
|
|
throw new ArgumentNullException("path");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var filename = Path.GetFileName(path);
|
|
|
|
var filename = Path.GetFileName(path);
|
|
|
|
|
|
|
|
|
|
|
|
// Ignore certain files
|
|
|
|
// Ignore certain files
|
|
|
|