Inject logger correctly into ActivityManager and ActivityRepository

This commit is contained in:
Mark Monteiro 2020-04-04 15:33:23 -04:00
parent 573da63d41
commit 7b31b0e322
3 changed files with 5 additions and 5 deletions

View File

@ -18,11 +18,11 @@ namespace Emby.Server.Implementations.Activity
private readonly IUserManager _userManager;
public ActivityManager(
ILoggerFactory loggerFactory,
ILogger<ActivityManager> logger,
IActivityRepository repo,
IUserManager userManager)
{
_logger = loggerFactory.CreateLogger(nameof(ActivityManager));
_logger = logger;
_repo = repo;
_userManager = userManager;
}

View File

@ -20,8 +20,8 @@ namespace Emby.Server.Implementations.Activity
private static readonly CultureInfo _usCulture = CultureInfo.ReadOnly(new CultureInfo("en-US"));
private readonly IFileSystem _fileSystem;
public ActivityRepository(ILoggerFactory loggerFactory, IServerApplicationPaths appPaths, IFileSystem fileSystem)
: base(loggerFactory.CreateLogger(nameof(ActivityRepository)))
public ActivityRepository(ILogger<ActivityRepository> logger, IServerApplicationPaths appPaths, IFileSystem fileSystem)
: base(logger)
{
DbFilePath = Path.Combine(appPaths.DataPath, "activitylog.db");
_fileSystem = fileSystem;

View File

@ -471,7 +471,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, encodingOptions);
var outputVideoCodec = GetVideoEncoder(state, encodingOptions);
var hasTextSubs = state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
if (!hasTextSubs)