aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-11 21:47:44 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-11 21:47:44 -0400
commita906b7358c963395b9169c1546c8bad9e826c686 (patch)
treef59f15a9aec38efd990d7dc10c99daba44084f92 /MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
parent6987c6341bba1988022960ca34de57f66c9776ae (diff)
change remote episode provider to xml reader
Diffstat (limited to 'MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs')
-rw-r--r--MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
index fbdbf15ff..2406d0470 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
@@ -121,9 +121,11 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
{
LazyInitializer.EnsureInitialized(ref _lastExecutionResult, ref _lastExecutionResultinitialized, ref _lastExecutionResultSyncLock, () =>
{
+ var path = GetHistoryFilePath(false);
+
try
{
- return JsonSerializer.DeserializeFromFile<TaskResult>(GetHistoryFilePath(false));
+ return JsonSerializer.DeserializeFromFile<TaskResult>(path);
}
catch (DirectoryNotFoundException)
{
@@ -135,6 +137,11 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
// File doesn't exist. No biggie
return null;
}
+ catch (Exception ex)
+ {
+ Logger.ErrorException("Error deserializing {0}", ex, path);
+ return null;
+ }
});
return _lastExecutionResult;