diff --git a/MediaBrowser.Controller/LiveTv/IListingsProvider.cs b/MediaBrowser.Controller/LiveTv/IListingsProvider.cs index e509728bf..54977c8d3 100644 --- a/MediaBrowser.Controller/LiveTv/IListingsProvider.cs +++ b/MediaBrowser.Controller/LiveTv/IListingsProvider.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.LiveTv { string Name { get; } string Type { get; } - Task> GetProgramsAsync(ListingsProviderInfo info, ChannelInfo channel, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken); + Task> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken); Task AddMetadata(ListingsProviderInfo info, List channels, CancellationToken cancellationToken); Task Validate(ListingsProviderInfo info); Task> GetLineups(ListingsProviderInfo info, string location); diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 6e8213ee0..37b6bf086 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -257,18 +257,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV public async Task> GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) { - var allChannels = await GetChannelsAsync(cancellationToken).ConfigureAwait(false); - var channelInfo = allChannels.FirstOrDefault(i => string.Equals(channelId, i.Id, StringComparison.OrdinalIgnoreCase)); - - if (channelInfo == null) - { - _logger.Debug("Returning empty program list because channel was not found."); - return new List(); - } - foreach (var provider in GetListingProviders()) { - var programs = await provider.Item1.GetProgramsAsync(provider.Item2, channelInfo, startDateUtc, endDateUtc, cancellationToken) + var programs = await provider.Item1.GetProgramsAsync(provider.Item2, channelId, startDateUtc, endDateUtc, cancellationToken) .ConfigureAwait(false); var list = programs.ToList(); diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index f5b41f3df..2656397bb 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -35,10 +35,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings _httpClient = httpClient; } - public async Task> GetProgramsAsync(ListingsProviderInfo info, ChannelInfo channel, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) + public async Task> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) { - var channelNumber = channel.Number; - List programsInfo = new List(); var token = await GetToken(info, cancellationToken); @@ -74,7 +72,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings ScheduleDirect.Station station = null; - if (!_channelPair.TryGetValue("", out station)) + if (!_channelPair.TryGetValue(channelNumber, out station)) { return programsInfo; } @@ -217,39 +215,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings } } - private async Task GetLineup(string listingsId, string token, CancellationToken cancellationToken) - { - var httpOptions = new HttpRequestOptions() - { - Url = ApiUrl + "/lineups/" + listingsId, - UserAgent = UserAgent, - CancellationToken = cancellationToken - }; - - httpOptions.RequestHeaders["token"] = token; - - using (var response = await _httpClient.Get(httpOptions)) - { - 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 channel = (map.channel ?? (map.atscMajor + "." + map.atscMinor)).TrimStart('0'); - _logger.Debug("Found channel: " + channel + " in Schedules Direct"); - - var schChannel = root.stations.FirstOrDefault(item => item.stationID == map.stationID); - - if (!_channelPair.ContainsKey(channel) && channel != "0.0" && schChannel != null) - { - _channelPair.TryAdd(channel, schChannel); - } - } - - return root; - } - } - private ProgramInfo GetProgram(string channel, ScheduleDirect.Program programInfo, ScheduleDirect.ProgramDetails details) { diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index fe099dc67..24df7c983 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -345,7 +345,9 @@ "ButtonSelectDirectory": "Select Directory", "LabelCustomPaths": "Specify custom paths where desired. Leave fields empty to use the defaults.", "LabelCachePath": "Cache path:", - "LabelCachePathHelp": "Specify a custom location for server cache files, such as images.", + "LabelCachePathHelp": "Specify a custom location for server cache files, such as images. Leave blank to use the server default.", + "LabelRecordingPath": "Recording path:", + "LabelRecordingPathHelp": "Specify a custom location to save recordings. Leave blank to use the server default.", "LabelImagesByNamePath": "Images by name path:", "LabelImagesByNamePathHelp": "Specify a custom location for downloaded actor, genre and studio images.", "LabelMetadataPath": "Metadata path:", @@ -1486,5 +1488,6 @@ "LabelZipCode": "Zip Code:", "GuideProviderListingsStep": "Step 2: Select Listings", "GuideProviderLoginStep": "Step 1: Login", - "LabelLineup": "Lineup" + "LabelLineup": "Lineup", + "MessageTunerDeviceNotListed": "Is your tuner device not listed? Try installing an external service plugin for more Live TV options." } diff --git a/MediaBrowser.Server.Implementations/Localization/iso6392.txt b/MediaBrowser.Server.Implementations/Localization/iso6392.txt index e2ba0be42..665a5375e 100644 --- a/MediaBrowser.Server.Implementations/Localization/iso6392.txt +++ b/MediaBrowser.Server.Implementations/Localization/iso6392.txt @@ -346,6 +346,7 @@ pli||pi|Pali|pali pol||pl|Polish|polonais pon|||Pohnpeian|pohnpei por||pt|Portuguese|portugais +pob||pt-br|Portuguese (Brazil)|portugais pra|||Prakrit languages|prâkrit, langues pro|||Provençal, Old (to 1500)|provençal ancien (jusqu'à 1500) pus||ps|Pushto; Pashto|pachto