diff options
| author | Claus Vium <clausvium@gmail.com> | 2019-02-05 09:49:46 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-02-05 16:47:50 +0100 |
| commit | 0ef2b46106937c8acbab8e2a6a1e08affb823d31 (patch) | |
| tree | d677d8611a00fb1c7ebe6749b8aaf5e209fa2522 /Emby.Notifications/Notifications.cs | |
| parent | 52294881b190ad0c4566f46988c5521f6fefabc1 (diff) | |
Remove custom Threading
Diffstat (limited to 'Emby.Notifications/Notifications.cs')
| -rw-r--r-- | Emby.Notifications/Notifications.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Emby.Notifications/Notifications.cs b/Emby.Notifications/Notifications.cs index 045aa6f16..d3290479f 100644 --- a/Emby.Notifications/Notifications.cs +++ b/Emby.Notifications/Notifications.cs @@ -20,7 +20,6 @@ using MediaBrowser.Model.Events; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Notifications; using MediaBrowser.Model.Tasks; -using MediaBrowser.Model.Threading; using Microsoft.Extensions.Logging; namespace Emby.Notifications @@ -40,9 +39,8 @@ namespace Emby.Notifications private readonly ILibraryManager _libraryManager; private readonly ISessionManager _sessionManager; private readonly IServerApplicationHost _appHost; - private readonly ITimerFactory _timerFactory; - private ITimer LibraryUpdateTimer { get; set; } + private Timer LibraryUpdateTimer { get; set; } private readonly object _libraryChangedSyncLock = new object(); private readonly IConfigurationManager _config; @@ -52,7 +50,7 @@ namespace Emby.Notifications private string[] _coreNotificationTypes; - public Notifications(IInstallationManager installationManager, IActivityManager activityManager, ILocalizationManager localization, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost, IConfigurationManager config, IDeviceManager deviceManager, ITimerFactory timerFactory) + public Notifications(IInstallationManager installationManager, IActivityManager activityManager, ILocalizationManager localization, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost, IConfigurationManager config, IDeviceManager deviceManager) { _installationManager = installationManager; _userManager = userManager; @@ -64,7 +62,6 @@ namespace Emby.Notifications _appHost = appHost; _config = config; _deviceManager = deviceManager; - _timerFactory = timerFactory; _localization = localization; _activityManager = activityManager; @@ -159,7 +156,7 @@ namespace Emby.Notifications { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, 5000, + LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, 5000, Timeout.Infinite); } else |
