diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-06-13 15:06:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-13 15:06:32 -0400 |
| commit | daae42fc355d55b0272311809f3e29004548f8ea (patch) | |
| tree | 6f8d3ead4deba9a34d928f810d5a73f91ddade17 /MediaBrowser.Server.Implementations | |
| parent | 7177c6e2470ebc4a7b4237348b01b93fd22cdde6 (diff) | |
| parent | 7c15dc96cb90a93bf120f5f0e365432affd62f33 (diff) | |
Merge pull request #1841 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs b/MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs index 561d46229..3e33066ae 100644 --- a/MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs +++ b/MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs @@ -20,7 +20,7 @@ namespace MediaBrowser.Server.Implementations.Collections public bool IsHiddenFromUser(User user) { - return !user.Configuration.DisplayCollectionsView; + return !ConfigurationManager.Configuration.DisplayCollectionsView; } public override string CollectionType diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index d9b7e8f4b..362718112 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -66,7 +66,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings return cacheFile; } - // TODO: Should this method be async? public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, string channelName, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) { var path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false); @@ -89,7 +88,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings SeasonNumber = p.Episode == null ? null : p.Episode.Series, IsSeries = p.IsSeries, IsRepeat = p.IsRepeat, - // IsPremiere = !p.PreviouslyShown.HasValue, + IsPremiere = p.Premiere != null, IsKids = p.Categories.Any(c => info.KidsCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), IsMovie = p.Categories.Any(c => info.MovieCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), IsNews = p.Categories.Any(c => info.NewsCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), @@ -147,7 +146,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings public async Task<List<ChannelInfo>> GetChannels(ListingsProviderInfo info, CancellationToken cancellationToken) { - return new List<ChannelInfo>(); + // In theory this should never be called because there is always only one lineup + var reader = new XmlTvReader(info.Path, GetLanguage(), null); + var results = reader.GetChannels(); + + // Should this method be async? + return results.Select(c => new ChannelInfo() + { + Id = c.Id, + Name = c.DisplayName, + ImageUrl = c.Icon != null && !String.IsNullOrEmpty(c.Icon.Source) ? c.Icon.Source : null + }).ToList(); } } }
\ No newline at end of file |
