|
|
|
@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
|
|
|
|
public class LibraryChangedNotifier : IServerEntryPoint
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The _library manager
|
|
|
|
|
/// The library manager.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private readonly ILibraryManager _libraryManager;
|
|
|
|
|
|
|
|
|
@ -30,7 +30,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
|
|
|
|
private readonly ILogger _logger;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The _library changed sync lock
|
|
|
|
|
/// The library changed sync lock.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private readonly object _libraryChangedSyncLock = new object();
|
|
|
|
|
|
|
|
|
@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
|
|
|
|
private Timer LibraryUpdateTimer { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The library update duration
|
|
|
|
|
/// The library update duration.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private const int LibraryUpdateDuration = 30000;
|
|
|
|
|
|
|
|
|
@ -188,8 +188,11 @@ namespace Emby.Server.Implementations.EntryPoints
|
|
|
|
|
{
|
|
|
|
|
if (LibraryUpdateTimer == null)
|
|
|
|
|
{
|
|
|
|
|
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration,
|
|
|
|
|
Timeout.Infinite);
|
|
|
|
|
LibraryUpdateTimer = new Timer(
|
|
|
|
|
LibraryUpdateTimerCallback,
|
|
|
|
|
null,
|
|
|
|
|
LibraryUpdateDuration,
|
|
|
|
|
Timeout.Infinite);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|