diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto/DtoService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 5c9f72b7d..edfef38fd 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -98,7 +98,7 @@ namespace MediaBrowser.Server.Implementations.Dto var byName = item as IItemByName; - if (byName != null && !(item is LiveTvChannel)) + if (byName != null) { if (options.Fields.Contains(ItemFields.ItemCounts)) { @@ -140,7 +140,7 @@ namespace MediaBrowser.Server.Implementations.Dto var byName = item as IItemByName; - if (byName != null && !(item is LiveTvChannel)) + if (byName != null) { if (options.Fields.Contains(ItemFields.ItemCounts)) { @@ -351,6 +351,12 @@ namespace MediaBrowser.Server.Implementations.Dto AttachBasicFields(dto, item, owner, options); + var tvChannel = item as LiveTvChannel; + if (tvChannel != null) + { + _livetvManager().AddChannelInfo(dto, tvChannel, options, user); + } + var collectionFolder = item as ICollectionFolder; if (collectionFolder != null) { @@ -1520,16 +1526,11 @@ namespace MediaBrowser.Server.Implementations.Dto SetPhotoProperties(dto, photo); } - var tvChannel = item as LiveTvChannel; - if (tvChannel != null) - { - dto.MediaSources = _mediaSourceManager().GetStaticMediaSources(tvChannel, true).ToList(); - } - + dto.ChannelId = item.ChannelId; + var channelItem = item as IChannelItem; if (channelItem != null) { - dto.ChannelId = channelItem.ChannelId; dto.ChannelName = _channelManagerFactory().GetChannel(channelItem.ChannelId).Name; } @@ -1646,7 +1647,8 @@ namespace MediaBrowser.Server.Implementations.Dto IsFolder = false, Recursive = true, IsVirtualUnaired = false, - IsMissing = false + IsMissing = false, + User = user }).Result.Items; |
