aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs
diff options
context:
space:
mode:
authorSven Van den brande <sven.vandenbrande@outlook.com>2013-10-31 21:46:03 +0100
committerSven Van den brande <sven.vandenbrande@outlook.com>2013-10-31 21:46:03 +0100
commite8f8d6651c86b3fd3350a5afae1d759fbbad06bd (patch)
tree6496b1525f0dfc448f0250f4fddaa634296ae94b /MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs
parent28ab28768a307d1cac60ebe79163b98291068cde (diff)
parent882d0681e68c5e0ae663cca75752e4df765c8dd5 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs
index cb6097504..723e4fdd3 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/RemoteNotifications.cs
@@ -1,5 +1,7 @@
using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common.IO;
using MediaBrowser.Common.Net;
+using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Notifications;
using MediaBrowser.Controller.Plugins;
@@ -26,11 +28,12 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
private readonly IJsonSerializer _json;
private readonly INotificationsRepository _notificationsRepo;
private readonly IUserManager _userManager;
+ private readonly IFileSystem _fileSystem;
private readonly TimeSpan _frequency = TimeSpan.FromHours(6);
private readonly TimeSpan _maxAge = TimeSpan.FromDays(31);
- public RemoteNotifications(IApplicationPaths appPaths, ILogger logger, IHttpClient httpClient, IJsonSerializer json, INotificationsRepository notificationsRepo, IUserManager userManager)
+ public RemoteNotifications(IApplicationPaths appPaths, ILogger logger, IHttpClient httpClient, IJsonSerializer json, INotificationsRepository notificationsRepo, IUserManager userManager, IFileSystem fileSystem)
{
_appPaths = appPaths;
_logger = logger;
@@ -38,6 +41,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
_json = json;
_notificationsRepo = notificationsRepo;
_userManager = userManager;
+ _fileSystem = fileSystem;
}
/// <summary>
@@ -56,7 +60,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
{
var dataPath = Path.Combine(_appPaths.DataPath, "remotenotifications.json");
- var lastRunTime = File.Exists(dataPath) ? File.GetLastWriteTimeUtc(dataPath) : DateTime.MinValue;
+ var lastRunTime = File.Exists(dataPath) ? _fileSystem.GetLastWriteTimeUtc(dataPath) : DateTime.MinValue;
try
{