diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto/DtoService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 6a0723c52..c7c93057d 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1111,7 +1111,7 @@ namespace MediaBrowser.Server.Implementations.Dto if (tvChannel != null) { - dto.MediaSources = GetMediaSources(tvChannel); + dto.MediaSources = tvChannel.GetMediaSources(true).ToList(); } var channelItem = item as IChannelItem; @@ -1123,43 +1123,6 @@ namespace MediaBrowser.Server.Implementations.Dto } } - public List<MediaSourceInfo> GetMediaSources(BaseItem item) - { - var video = item as Video; - - if (video != null) - { - return video.GetMediaSources(true).ToList(); - } - - var audio = item as Audio; - - if (audio != null) - { - return audio.GetMediaSources(true).ToList(); - } - - var result = new List<MediaSourceInfo> - { - new MediaSourceInfo - { - Id = item.Id.ToString("N"), - LocationType = item.LocationType, - Name = item.Name, - Path = GetMappedPath(item), - MediaStreams = _itemRepo.GetMediaStreams(new MediaStreamQuery - { - ItemId = item.Id - - }).ToList(), - - RunTimeTicks = item.RunTimeTicks - } - }; - - return result; - } - private string GetMappedPath(IHasMetadata item) { var path = item.Path; |
