From 32ba8721a2acd863fb3fe86a06bb0220a071ac80 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 8 Jun 2016 13:10:07 -0400 Subject: [PATCH 1/3] update guide events --- MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 46f7a8f30..fce1ffd2c 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -2014,6 +2014,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv info.Priority = defaultValues.Priority; await service.CreateTimerAsync(info, cancellationToken).ConfigureAwait(false); + _lastRecordingRefreshTime = DateTime.MinValue; _logger.Info("New recording scheduled"); @@ -2021,7 +2022,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv { Argument = new TimerEventInfo { - ProgramId = info.ProgramId + ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId).ToString("N") } }, _logger); } @@ -2043,7 +2044,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv { Argument = new TimerEventInfo { - ProgramId = info.ProgramId + ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId).ToString("N") } }, _logger); } From 527014d73a041060f423223ce7fa7bb6cf28f58e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 8 Jun 2016 17:04:52 -0400 Subject: [PATCH 2/3] stub out channel mapper popup --- .../LiveTv/ILiveTvService.cs | 19 +++ .../LiveTv/EmbyTV/EmbyTV.cs | 22 ++- .../LiveTv/Listings/SchedulesDirect.cs | 142 ++++++++++++------ .../LiveTv/LiveTvManager.cs | 31 +++- .../MediaBrowser.WebDashboard.csproj | 3 + 5 files changed, 166 insertions(+), 51 deletions(-) diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index 4ef4847a3..d7d8336d0 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -226,4 +226,23 @@ namespace MediaBrowser.Controller.LiveTv /// Task. Task ResetTuner(string id, CancellationToken cancellationToken); } + + public interface ISupportsNewTimerIds + { + /// + /// Creates the timer asynchronous. + /// + /// The information. + /// The cancellation token. + /// Task. + Task CreateTimer(TimerInfo info, CancellationToken cancellationToken); + + /// + /// Creates the series timer asynchronous. + /// + /// The information. + /// The cancellation token. + /// Task. + Task CreateSeriesTimer(SeriesTimerInfo info, CancellationToken cancellationToken); + } } diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index d3e5bc1f9..148d5636f 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -35,7 +35,7 @@ using Microsoft.Win32; namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { - public class EmbyTV : ILiveTvService, IHasRegistrationInfo, IDisposable + public class EmbyTV : ILiveTvService, ISupportsNewTimerIds, IHasRegistrationInfo, IDisposable { private readonly IApplicationHost _appHpst; private readonly ILogger _logger; @@ -435,12 +435,22 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV public Task CreateTimerAsync(TimerInfo info, CancellationToken cancellationToken) { - info.Id = Guid.NewGuid().ToString("N"); - _timerProvider.Add(info); - return Task.FromResult(0); + return CreateTimer(info, cancellationToken); } - public async Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken) + public Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken) + { + return CreateSeriesTimer(info, cancellationToken); + } + + public Task CreateTimer(TimerInfo info, CancellationToken cancellationToken) + { + info.Id = Guid.NewGuid().ToString("N"); + _timerProvider.Add(info); + return Task.FromResult(info.Id); + } + + public async Task CreateSeriesTimer(SeriesTimerInfo info, CancellationToken cancellationToken) { info.Id = Guid.NewGuid().ToString("N"); @@ -470,6 +480,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV _seriesTimerProvider.Add(info); await UpdateTimersForSeriesTimer(epgData, info, false).ConfigureAwait(false); + + return info.Id; } public async Task UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken) diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index fe455665f..6443440c8 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -506,8 +506,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings } private async Task> GetImageForPrograms( - ListingsProviderInfo info, - List programIds, + ListingsProviderInfo info, + List programIds, CancellationToken cancellationToken) { var imageIdString = "["; @@ -564,7 +564,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings try { - using (Stream responce = await Get(options, false, info).ConfigureAwait(false)) + using (Stream responce = await Get(options, false, info).ConfigureAwait(false)) { var root = _jsonSerializer.DeserializeFromStream>(responce); @@ -666,58 +666,60 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings } } - private async Task Post(HttpRequestOptions options, - bool enableRetry, - ListingsProviderInfo providerInfo) + private async Task Post(HttpRequestOptions options, + bool enableRetry, + ListingsProviderInfo providerInfo) { try { return await _httpClient.Post(options).ConfigureAwait(false); - } - catch (HttpException ex) - { - _tokens.Clear(); + } + catch (HttpException ex) + { + _tokens.Clear(); - if (!ex.StatusCode.HasValue || (int)ex.StatusCode.Value >= 500) - { - enableRetry = false; - } + if (!ex.StatusCode.HasValue || (int)ex.StatusCode.Value >= 500) + { + enableRetry = false; + } - if (!enableRetry) { - throw; - } - } + if (!enableRetry) + { + throw; + } + } - var newToken = await GetToken (providerInfo, options.CancellationToken).ConfigureAwait (false); - options.RequestHeaders ["token"] = newToken; - return await Post (options, false, providerInfo).ConfigureAwait (false); + var newToken = await GetToken(providerInfo, options.CancellationToken).ConfigureAwait(false); + options.RequestHeaders["token"] = newToken; + return await Post(options, false, providerInfo).ConfigureAwait(false); } - private async Task Get(HttpRequestOptions options, - bool enableRetry, - ListingsProviderInfo providerInfo) + private async Task Get(HttpRequestOptions options, + bool enableRetry, + ListingsProviderInfo providerInfo) { try { return await _httpClient.Get(options).ConfigureAwait(false); - } - catch (HttpException ex) - { - _tokens.Clear(); + } + catch (HttpException ex) + { + _tokens.Clear(); - if (!ex.StatusCode.HasValue || (int)ex.StatusCode.Value >= 500) - { - enableRetry = false; - } + if (!ex.StatusCode.HasValue || (int)ex.StatusCode.Value >= 500) + { + enableRetry = false; + } - if (!enableRetry) { - throw; - } - } + if (!enableRetry) + { + throw; + } + } - var newToken = await GetToken (providerInfo, options.CancellationToken).ConfigureAwait (false); - options.RequestHeaders ["token"] = newToken; - return await Get (options, false, providerInfo).ConfigureAwait (false); + var newToken = await GetToken(providerInfo, options.CancellationToken).ConfigureAwait(false); + options.RequestHeaders["token"] = newToken; + return await Get(options, false, providerInfo).ConfigureAwait(false); } private async Task GetTokenInternal(string username, string password, @@ -734,7 +736,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings //_logger.Info("Obtaining token from Schedules Direct from addres: " + httpOptions.Url + " with body " + // httpOptions.RequestContent); - using (var responce = await Post(httpOptions, false, null).ConfigureAwait(false)) + using (var responce = await Post(httpOptions, false, null).ConfigureAwait(false)) { var root = _jsonSerializer.DeserializeFromStream(responce.Content); if (root.message == "OK") @@ -816,7 +818,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings try { - using (var response = await Get(options, false, null).ConfigureAwait(false)) + using (var response = await Get(options, false, null).ConfigureAwait(false)) { var root = _jsonSerializer.DeserializeFromStream(response); @@ -871,7 +873,63 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings public async Task> GetChannels(ListingsProviderInfo info, CancellationToken cancellationToken) { - return new List(); + var listingsId = info.ListingsId; + if (string.IsNullOrWhiteSpace(listingsId)) + { + throw new Exception("ListingsId required"); + } + + var token = await GetToken(info, cancellationToken); + + if (string.IsNullOrWhiteSpace(token)) + { + throw new Exception("token required"); + } + + ClearPairCache(listingsId); + + var httpOptions = new HttpRequestOptions() + { + Url = ApiUrl + "/lineups/" + listingsId, + UserAgent = UserAgent, + CancellationToken = cancellationToken, + LogErrorResponseBody = true, + // The data can be large so give it some extra time + TimeoutMs = 60000 + }; + + httpOptions.RequestHeaders["token"] = token; + + var list = new List(); + + using (var response = await Get(httpOptions, true, info).ConfigureAwait(false)) + { + var root = _jsonSerializer.DeserializeFromStream(response); + _logger.Info("Found " + root.map.Count + " channels on the lineup on ScheduleDirect"); + _logger.Info("Mapping Stations to Channel"); + foreach (ScheduleDirect.Map map in root.map) + { + var channelNumber = map.logicalChannelNumber; + + if (string.IsNullOrWhiteSpace(channelNumber)) + { + channelNumber = map.channel; + } + if (string.IsNullOrWhiteSpace(channelNumber)) + { + channelNumber = map.atscMajor + "." + map.atscMinor; + } + channelNumber = channelNumber.TrimStart('0'); + + list.Add(new ChannelInfo + { + Number = channelNumber, + Name = map.channel + }); + } + } + + return list; } public class ScheduleDirect diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index fce1ffd2c..e6e4822ef 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -2013,7 +2013,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv var defaultValues = await service.GetNewTimerDefaultsAsync(cancellationToken).ConfigureAwait(false); info.Priority = defaultValues.Priority; - await service.CreateTimerAsync(info, cancellationToken).ConfigureAwait(false); + string newTimerId = null; + var supportsNewTimerIds = service as ISupportsNewTimerIds; + if (supportsNewTimerIds != null) + { + newTimerId = await supportsNewTimerIds.CreateTimer(info, cancellationToken).ConfigureAwait(false); + newTimerId = _tvDtoService.GetInternalTimerId(timer.ServiceName, newTimerId).ToString("N"); + } + else + { + await service.CreateTimerAsync(info, cancellationToken).ConfigureAwait(false); + } _lastRecordingRefreshTime = DateTime.MinValue; _logger.Info("New recording scheduled"); @@ -2022,7 +2032,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv { Argument = new TimerEventInfo { - ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId).ToString("N") + ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId).ToString("N"), + Id = newTimerId } }, _logger); } @@ -2037,14 +2048,26 @@ namespace MediaBrowser.Server.Implementations.LiveTv var defaultValues = await service.GetNewTimerDefaultsAsync(cancellationToken).ConfigureAwait(false); info.Priority = defaultValues.Priority; - await service.CreateSeriesTimerAsync(info, cancellationToken).ConfigureAwait(false); + string newTimerId = null; + var supportsNewTimerIds = service as ISupportsNewTimerIds; + if (supportsNewTimerIds != null) + { + newTimerId = await supportsNewTimerIds.CreateSeriesTimer(info, cancellationToken).ConfigureAwait(false); + newTimerId = _tvDtoService.GetInternalSeriesTimerId(timer.ServiceName, newTimerId).ToString("N"); + } + else + { + await service.CreateSeriesTimerAsync(info, cancellationToken).ConfigureAwait(false); + } + _lastRecordingRefreshTime = DateTime.MinValue; EventHelper.QueueEventIfNotNull(SeriesTimerCreated, this, new GenericEventArgs { Argument = new TimerEventInfo { - ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId).ToString("N") + ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId).ToString("N"), + Id = newTimerId } }, _logger); } diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 94b2adf2c..3456ea2cc 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -104,6 +104,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest From b0c1ba1e1961783975a5231f801733553bee9faf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 9 Jun 2016 12:13:25 -0400 Subject: [PATCH 3/3] stub out channel mapping --- MediaBrowser.Api/LiveTv/LiveTvService.cs | 86 ++++++++++++++++++- .../Playback/BaseStreamingService.cs | 6 ++ .../LiveTv/ILiveTvManager.cs | 3 +- MediaBrowser.Dlna/Didl/DidlBuilder.cs | 18 ++-- .../Encoder/EncodingJobFactory.cs | 6 ++ .../LiveTv/EmbyTV/EmbyTV.cs | 23 +++++ .../LiveTv/LiveTvManager.cs | 8 +- 7 files changed, 138 insertions(+), 12 deletions(-) diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index d5290959d..ddc389f03 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -484,6 +484,30 @@ namespace MediaBrowser.Api.LiveTv { } + [Route("/LiveTv/ChannelMappingOptions")] + [Authenticated(AllowBeforeStartupWizard = true)] + public class GetChannelMappingOptions + { + [ApiMember(Name = "Id", Description = "Provider id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")] + public string ProviderId { get; set; } + } + + public class ChannelMappingOptions + { + public List TunerChannels { get; set; } + public List ProviderChannels { get; set; } + public List Mappings { get; set; } + public string ProviderName { get; set; } + } + + public class TunerChannelMapping + { + public string Name { get; set; } + public string Number { get; set; } + public string ProviderChannelNumber { get; set; } + public string ProviderChannelName { get; set; } + } + [Route("/LiveTv/Registration", "GET")] [Authenticated] public class GetLiveTvRegistrationInfo : IReturn @@ -550,6 +574,66 @@ namespace MediaBrowser.Api.LiveTv return ToOptimizedResult(result); } + public async Task Get(GetChannelMappingOptions request) + { + var config = GetConfiguration(); + + var listingProvider = config.ListingProviders.First(i => string.Equals(request.ProviderId, i.Id, StringComparison.OrdinalIgnoreCase)); + + var tunerChannels = await _liveTvManager.GetChannelsForListingsProvider(request.ProviderId, CancellationToken.None) + .ConfigureAwait(false); + + var providerChannels = await _liveTvManager.GetChannelsFromListingsProviderData(request.ProviderId, CancellationToken.None) + .ConfigureAwait(false); + + var mappings = listingProvider.ChannelMappings.ToList(); + + var result = new ChannelMappingOptions + { + TunerChannels = tunerChannels.Select(i => GetTunerChannelMapping(i, mappings, providerChannels)).ToList(), + + ProviderChannels = providerChannels.Select(i => new NameIdPair + { + Name = i.Name, + Id = i.Number + + }).ToList(), + + Mappings = mappings, + + ProviderName = "Schedules Direct" + }; + + return ToOptimizedResult(result); + } + + private TunerChannelMapping GetTunerChannelMapping(ChannelInfo channel, List mappings, List providerChannels) + { + var result = new TunerChannelMapping + { + Name = channel.Number + " " + channel.Name, + Number = channel.Number + }; + + var mapping = mappings.FirstOrDefault(i => string.Equals(i.Name, channel.Number, StringComparison.OrdinalIgnoreCase)); + var providerChannelNumber = channel.Number; + + if (mapping != null) + { + providerChannelNumber = mapping.Value; + } + + var providerChannel = providerChannels.FirstOrDefault(i => string.Equals(i.Number, providerChannelNumber, StringComparison.OrdinalIgnoreCase)); + + if (providerChannel != null) + { + result.ProviderChannelNumber = providerChannel.Number; + result.ProviderChannelName = providerChannel.Name; + } + + return result; + } + public object Get(GetSatIniMappings request) { return ToOptimizedResult(_liveTvManager.GetSatIniMappings()); @@ -657,7 +741,7 @@ namespace MediaBrowser.Api.LiveTv Items = returnArray, TotalRecordCount = channelResult.TotalRecordCount }; - + return ToOptimizedSerializedResultUsingCache(result); } diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 0cfb58b2e..7913f547a 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1236,6 +1236,12 @@ namespace MediaBrowser.Api.Playback { var inputVideoCodec = videoStream == null ? null : videoStream.Codec; bitrate = ResolutionNormalizer.ScaleBitrate(bitrate.Value, inputVideoCodec, outputVideoCodec); + + // If a max bitrate was requested, don't let the scaled bitrate exceed it + if (request.VideoBitRate.HasValue) + { + bitrate = Math.Min(bitrate.Value, request.VideoBitRate.Value); + } } return bitrate; diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index 15fc9350b..9cb0476ba 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -387,7 +387,8 @@ namespace MediaBrowser.Controller.LiveTv Task> GetSatChannelScanResult(TunerHostInfo info, CancellationToken cancellationToken); - Task> GetChannelsFromListingsProvider(string id, CancellationToken cancellationToken); + Task> GetChannelsForListingsProvider(string id, CancellationToken cancellationToken); + Task> GetChannelsFromListingsProviderData(string id, CancellationToken cancellationToken); event EventHandler> SeriesTimerCancelled; event EventHandler> TimerCancelled; diff --git a/MediaBrowser.Dlna/Didl/DidlBuilder.cs b/MediaBrowser.Dlna/Didl/DidlBuilder.cs index af833a85c..77daebee2 100644 --- a/MediaBrowser.Dlna/Didl/DidlBuilder.cs +++ b/MediaBrowser.Dlna/Didl/DidlBuilder.cs @@ -1015,17 +1015,17 @@ namespace MediaBrowser.Dlna.Didl int? width = null; int? height = null; - //try - //{ - // var size = _imageProcessor.GetImageSize(imageInfo); + try + { + var size = _imageProcessor.GetImageSize(imageInfo); - // width = Convert.ToInt32(size.Width); - // height = Convert.ToInt32(size.Height); - //} - //catch - //{ + width = Convert.ToInt32(size.Width); + height = Convert.ToInt32(size.Height); + } + catch + { - //} + } var inputFormat = (Path.GetExtension(imageInfo.Path) ?? string.Empty) .TrimStart('.') diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs index f858fab32..7fe7facdf 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs @@ -425,6 +425,12 @@ namespace MediaBrowser.MediaEncoding.Encoder { var inputVideoCodec = videoStream == null ? null : videoStream.Codec; bitrate = ResolutionNormalizer.ScaleBitrate(bitrate.Value, inputVideoCodec, outputVideoCodec); + + // If a max bitrate was requested, don't let the scaled bitrate exceed it + if (request.VideoBitRate.HasValue) + { + bitrate = Math.Min(bitrate.Value, request.VideoBitRate.Value); + } } return bitrate; diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 148d5636f..d38e9ad32 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -382,6 +382,29 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV return list; } + public async Task> GetChannelsForListingsProvider(ListingsProviderInfo listingsProvider, CancellationToken cancellationToken) + { + var list = new List(); + + foreach (var hostInstance in _liveTvManager.TunerHosts) + { + try + { + var channels = await hostInstance.GetChannels(cancellationToken).ConfigureAwait(false); + + list.AddRange(channels); + } + catch (Exception ex) + { + _logger.ErrorException("Error getting channels", ex); + } + } + + return list + .Where(i => IsListingProviderEnabledForTuner(listingsProvider, i.TunerHostId)) + .ToList(); + } + public Task> GetChannelsAsync(CancellationToken cancellationToken) { return GetChannelsAsync(false, cancellationToken); diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index e6e4822ef..d7491d2de 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -2585,7 +2585,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv return new TunerHosts.SatIp.ChannelScan(_logger).Scan(info, cancellationToken); } - public Task> GetChannelsFromListingsProvider(string id, CancellationToken cancellationToken) + public Task> GetChannelsForListingsProvider(string id, CancellationToken cancellationToken) + { + var info = GetConfiguration().ListingProviders.First(i => string.Equals(i.Id, id, StringComparison.OrdinalIgnoreCase)); + return EmbyTV.EmbyTV.Current.GetChannelsForListingsProvider(info, cancellationToken); + } + + public Task> GetChannelsFromListingsProviderData(string id, CancellationToken cancellationToken) { var info = GetConfiguration().ListingProviders.First(i => string.Equals(i.Id, id, StringComparison.OrdinalIgnoreCase)); var provider = _listingProviders.First(i => string.Equals(i.Type, info.Type, StringComparison.OrdinalIgnoreCase));