change remote episode provider to xml reader

This commit is contained in:
Luke Pulverenti
2013-10-11 21:47:44 -04:00
parent 6987c6341b
commit a906b7358c
7 changed files with 574 additions and 417 deletions

View File

@@ -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;