mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-10 01:38:49 +01:00
update next/previous buttons
This commit is contained in:
@@ -271,7 +271,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
return dto;
|
||||
}
|
||||
|
||||
public LiveTvTunerInfoDto GetTunerInfoDto(string serviceName, LiveTvTunerInfo info)
|
||||
public LiveTvTunerInfoDto GetTunerInfoDto(string serviceName, LiveTvTunerInfo info, string channelName)
|
||||
{
|
||||
var dto = new LiveTvTunerInfoDto
|
||||
{
|
||||
@@ -280,7 +280,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
Clients = info.Clients,
|
||||
ProgramName = info.ProgramName,
|
||||
SourceType = info.SourceType,
|
||||
Status = info.Status
|
||||
Status = info.Status,
|
||||
ChannelName = channelName
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(info.ChannelId))
|
||||
|
||||
@@ -1435,7 +1435,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
info.HasUpdateAvailable = statusInfo.HasUpdateAvailable;
|
||||
info.HomePageUrl = service.HomePageUrl;
|
||||
|
||||
info.Tuners = statusInfo.Tuners.Select(i => _tvDtoService.GetTunerInfoDto(service.Name, i)).ToList();
|
||||
info.Tuners = statusInfo.Tuners.Select(i =>
|
||||
{
|
||||
string channelName = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(i.ChannelId))
|
||||
{
|
||||
var internalChannelId = _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId);
|
||||
var channel = GetInternalChannel(internalChannelId);
|
||||
channelName = channel == null ? null : channel.Name;
|
||||
}
|
||||
|
||||
return _tvDtoService.GetTunerInfoDto(service.Name, i, channelName);
|
||||
|
||||
}).ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user