The Free Software Media System - Server Backend & API
update tv guide
Luke Pulverenti23bab4030872
diff --git a/MediaBrowser.Controller/LiveTv/IListingsProvider.cs b/MediaBrowser.Controller/LiveTv/IListingsProvider.csindex e509728bfa..54977c8d3c 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<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, ChannelInfo channel, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken);+ Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken);Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels, CancellationToken cancellationToken);Task Validate(ListingsProviderInfo info);Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string location);diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex 6e8213ee09..37b6bf0866 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.EmbyTVpublic async Task<IEnumerable<ProgramInfo>> 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<ProgramInfo>();- }-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.csindex f5b41f3df7..2656397bb8 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<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, ChannelInfo channel, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)+ public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken){- var channelNumber = channel.Number;-List<ProgramInfo> programsInfo = new List<ProgramInfo>();var token = await GetToken(info, cancellationToken);@@ -74,7 +72,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.ListingsScheduleDirect.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<ScheduleDirect.Channel> 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<ScheduleDirect.Channel>(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.jsonindex fe099dc672..24df7c9837 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.txtindex e2ba0be423..665a5375e4 100644--- a/MediaBrowser.Server.Implementations/Localization/iso6392.txt+++ b/MediaBrowser.Server.Implementations/Localization/iso6392.txt@@ -346,6 +346,7 @@ pli||pi|Pali|palipol||pl|Polish|polonaispon|||Pohnpeian|pohnpeipor||pt|Portuguese|portugais+pob||pt-br|Portuguese (Brazil)|portugaispra|||Prakrit languages|prâkrit, languespro|||Provençal, Old (to 1500)|provençal ancien (jusqu'à 1500)pus||ps|Pushto; Pashto|pachto