aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/Subtitles/SubtitleManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/Subtitles/SubtitleManager.cs')
-rw-r--r--MediaBrowser.Providers/Subtitles/SubtitleManager.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs
index 071687c0f..f9348a761 100644
--- a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs
+++ b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs
@@ -1,5 +1,4 @@
-using MediaBrowser.Common.Events;
-using MediaBrowser.Common.Extensions;
+using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV;
@@ -8,7 +7,7 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Subtitles;
using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Logging;
+using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Providers;
using System;
using System.Collections.Generic;
@@ -101,7 +100,7 @@ namespace MediaBrowser.Providers.Subtitles
}
catch (Exception ex)
{
- _logger.ErrorException("Error downloading subtitles from {0}", ex, provider.Name);
+ _logger.LogError(ex, "Error downloading subtitles from {Provider}", provider.Name);
}
}
return new RemoteSubtitleInfo[] { };
@@ -119,7 +118,7 @@ namespace MediaBrowser.Providers.Subtitles
}
catch (Exception ex)
{
- _logger.ErrorException("Error downloading subtitles from {0}", ex, i.Name);
+ _logger.LogError(ex, "Error downloading subtitles from {0}", i.Name);
return new RemoteSubtitleInfo[] { };
}
});
@@ -189,13 +188,12 @@ namespace MediaBrowser.Providers.Subtitles
}
catch (Exception ex)
{
- EventHelper.FireEventIfNotNull(SubtitleDownloadFailure, this, new SubtitleDownloadFailureEventArgs
+ SubtitleDownloadFailure?.Invoke(this, new SubtitleDownloadFailureEventArgs
{
Item = video,
Exception = ex,
Provider = provider.Name
-
- }, _logger);
+ });
throw;
}
@@ -207,7 +205,7 @@ namespace MediaBrowser.Providers.Subtitles
foreach (var savePath in savePaths)
{
- _logger.Info("Saving subtitles to {0}", savePath);
+ _logger.LogInformation("Saving subtitles to {0}", savePath);
_monitor.ReportFileSystemChangeBeginning(savePath);