diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-13 01:44:20 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-13 01:44:20 -0400 |
| commit | bc656edf4ff5cc60b246b6d59f7483610677ce69 (patch) | |
| tree | 1b37dcd23f6ece1051c3ab3ce1d793b9317229ec /MediaBrowser.Api/LiveTv/LiveTvService.cs | |
| parent | 66ad10348fe9383df7b939c2de5a93c044ec351d (diff) | |
update resolved video titles
Diffstat (limited to 'MediaBrowser.Api/LiveTv/LiveTvService.cs')
| -rw-r--r-- | MediaBrowser.Api/LiveTv/LiveTvService.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index f46c3e50f..1ae7323dc 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -947,9 +947,9 @@ namespace MediaBrowser.Api.LiveTv public object Get(GetChannel request) { - var user = string.IsNullOrWhiteSpace(request.UserId) ? null : _userManager.GetUserById(request.UserId); + var user = _userManager.GetUserById(request.UserId); - var item = _libraryManager.GetItemById(request.Id); + var item = string.IsNullOrEmpty(request.Id) ? user.RootFolder : _libraryManager.GetItemById(request.Id); var dtoOptions = GetDtoOptions(_authContext, request); @@ -1098,12 +1098,13 @@ namespace MediaBrowser.Api.LiveTv public async Task<object> Get(GetRecording request) { - var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(request.UserId); + var user = _userManager.GetUserById(request.UserId); - var options = new DtoOptions(); - options.DeviceId = _authContext.GetAuthorizationInfo(Request).DeviceId; + var item = string.IsNullOrEmpty(request.Id) ? user.RootFolder : _libraryManager.GetItemById(request.Id); - var result = await _liveTvManager.GetRecording(request.Id, options, CancellationToken.None, user).ConfigureAwait(false); + var dtoOptions = GetDtoOptions(_authContext, request); + + var result = _dtoService.GetBaseItemDto(item, dtoOptions, user); return ToOptimizedSerializedResultUsingCache(result); } |
