aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Dto/DtoService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-19 01:04:38 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-19 01:04:38 -0400
commit7b93b7a33c9c5d099759d6f9a9ca66c08029e94e (patch)
treecf45299999f25a5c47eb1fd4c1e27fde0100a95d /MediaBrowser.Server.Implementations/Dto/DtoService.cs
parentcbac67b5ae21c42828600ec5865f84640eee91da (diff)
finish removing ChannelFolderItem
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto/DtoService.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 61da810aa..581b03f08 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -1534,9 +1534,13 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.ChannelId = item.ChannelId;
- if (item.SourceType == SourceType.Channel)
+ if (item.SourceType == SourceType.Channel && !string.IsNullOrWhiteSpace(item.ChannelId))
{
- dto.ChannelName = _channelManagerFactory().GetChannel(item.ChannelId).Name;
+ var channel = _libraryManager.GetItemById(item.ChannelId);
+ if (channel != null)
+ {
+ dto.ChannelName = channel.Name;
+ }
}
}