diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-24 22:57:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-24 22:57:44 -0500 |
| commit | 2c9e056d52840dd98da27a6527fab970150c139f (patch) | |
| tree | 8af78ab36731a998807633e5b76d26f26de9faed /MediaBrowser.Api/Playback/MediaInfoService.cs | |
| parent | e05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff) | |
| parent | 1d7d4c573875093b97a5929fdee976cd0dcbedea (diff) | |
Merge pull request #699 from jellyfin/dev
Dev sync
Diffstat (limited to 'MediaBrowser.Api/Playback/MediaInfoService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/MediaInfoService.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index 1c7be52f3..ab3994a63 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -74,8 +74,19 @@ namespace MediaBrowser.Api.Playback private readonly IUserManager _userManager; private readonly IJsonSerializer _json; private readonly IAuthorizationContext _authContext; - - public MediaInfoService(IMediaSourceManager mediaSourceManager, IDeviceManager deviceManager, ILibraryManager libraryManager, IServerConfigurationManager config, INetworkManager networkManager, IMediaEncoder mediaEncoder, IUserManager userManager, IJsonSerializer json, IAuthorizationContext authContext) + private readonly ILogger _logger; + + public MediaInfoService( + IMediaSourceManager mediaSourceManager, + IDeviceManager deviceManager, + ILibraryManager libraryManager, + IServerConfigurationManager config, + INetworkManager networkManager, + IMediaEncoder mediaEncoder, + IUserManager userManager, + IJsonSerializer json, + IAuthorizationContext authContext, + ILoggerFactory loggerFactory) { _mediaSourceManager = mediaSourceManager; _deviceManager = deviceManager; @@ -86,6 +97,7 @@ namespace MediaBrowser.Api.Playback _userManager = userManager; _json = json; _authContext = authContext; + _logger = loggerFactory.CreateLogger(nameof(MediaInfoService)); } public object Get(GetBitrateTestBytes request) @@ -165,7 +177,7 @@ namespace MediaBrowser.Api.Playback var profile = request.DeviceProfile; - //Logger.Info("GetPostedPlaybackInfo profile: {0}", _json.SerializeToString(profile)); + //Logger.LogInformation("GetPostedPlaybackInfo profile: {profile}", _json.SerializeToString(profile)); if (profile == null) { @@ -262,7 +274,7 @@ namespace MediaBrowser.Api.Playback catch (Exception ex) { mediaSources = new List<MediaSourceInfo>(); - // TODO Log exception + _logger.LogError(ex, "Could not find media sources for item id {id}", id); // TODO PlaybackException ?? //result.ErrorCode = ex.ErrorCode; } |
