|
@@ -66,7 +66,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|
|
|
|
|
if (program != null)
|
|
if (program != null)
|
|
{
|
|
{
|
|
- dto.ProgramInfo = GetProgramInfoDto(program, channel.ChannelInfo.Name);
|
|
|
|
|
|
+ dto.ProgramInfo = GetProgramInfoDto(program, channel);
|
|
|
|
|
|
dto.ProgramInfo.TimerId = dto.Id;
|
|
dto.ProgramInfo.TimerId = dto.Id;
|
|
dto.ProgramInfo.SeriesTimerId = dto.SeriesTimerId;
|
|
dto.ProgramInfo.SeriesTimerId = dto.SeriesTimerId;
|
|
@@ -260,7 +260,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|
|
|
|
|
if (channel != null)
|
|
if (channel != null)
|
|
{
|
|
{
|
|
- dto.ChannelName = channel.ChannelInfo.Name;
|
|
|
|
|
|
+ dto.ChannelName = channel.Name;
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(channel.PrimaryImagePath))
|
|
|
|
+ {
|
|
|
|
+ dto.ChannelPrimaryImageTag = GetImageTag(channel);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return dto;
|
|
return dto;
|
|
@@ -303,13 +308,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|
|
|
|
|
if (currentProgram != null)
|
|
if (currentProgram != null)
|
|
{
|
|
{
|
|
- dto.CurrentProgram = GetProgramInfoDto(currentProgram, channelInfo.Name, user);
|
|
|
|
|
|
+ dto.CurrentProgram = GetProgramInfoDto(currentProgram, info, user);
|
|
}
|
|
}
|
|
|
|
|
|
return dto;
|
|
return dto;
|
|
}
|
|
}
|
|
|
|
|
|
- public ProgramInfoDto GetProgramInfoDto(LiveTvProgram item, string channelName, User user = null)
|
|
|
|
|
|
+ public ProgramInfoDto GetProgramInfoDto(LiveTvProgram item, LiveTvChannel channel, User user = null)
|
|
{
|
|
{
|
|
var program = item.ProgramInfo;
|
|
var program = item.ProgramInfo;
|
|
|
|
|
|
@@ -331,7 +336,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|
CommunityRating = GetClientCommunityRating(program.CommunityRating),
|
|
CommunityRating = GetClientCommunityRating(program.CommunityRating),
|
|
IsRepeat = program.IsRepeat,
|
|
IsRepeat = program.IsRepeat,
|
|
EpisodeTitle = program.EpisodeTitle,
|
|
EpisodeTitle = program.EpisodeTitle,
|
|
- ChannelName = channelName,
|
|
|
|
IsMovie = program.IsMovie,
|
|
IsMovie = program.IsMovie,
|
|
IsSeries = program.IsSeries,
|
|
IsSeries = program.IsSeries,
|
|
IsSports = program.IsSports,
|
|
IsSports = program.IsSports,
|
|
@@ -343,6 +347,16 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|
Type = "Program"
|
|
Type = "Program"
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ if (channel != null)
|
|
|
|
+ {
|
|
|
|
+ dto.ChannelName = channel.Name;
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(channel.PrimaryImagePath))
|
|
|
|
+ {
|
|
|
|
+ dto.ChannelPrimaryImageTag = GetImageTag(channel);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
var imageTag = GetImageTag(item);
|
|
var imageTag = GetImageTag(item);
|
|
|
|
|
|
if (imageTag.HasValue)
|
|
if (imageTag.HasValue)
|