aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorAlex Stevens <ads@chubbymusic.co.uk>2016-06-06 23:04:15 +0100
committerAlex Stevens <ads@chubbymusic.co.uk>2016-06-06 23:04:15 +0100
commit627b7d9b7ec04615afd89dc12a0d2cc42b6233ae (patch)
tree00ee856389bb790bc8ddcd8904122527cc07f1ca /MediaBrowser.Server.Implementations
parent83105f5aaeea7af09154f6c765b414393740f00d (diff)
Changed Genre Mapping to be case insensitve
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index 5b0b2ad84..4d2fc8bfe 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
@@ -41,9 +41,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
public Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, string channelName, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
{
var reader = new XmlTvReader(info.Path, GetLanguage(), null);
- string mappedChannel = channelNumber;
- var results = reader.GetProgrammes(mappedChannel, startDateUtc, endDateUtc, cancellationToken);
+ var results = reader.GetProgrammes(channelNumber, startDateUtc, endDateUtc, cancellationToken);
return Task.FromResult(results.Select(p => new ProgramInfo()
{
ChannelId = p.ChannelId,
@@ -61,10 +60,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
IsSeries = p.IsSeries,
IsRepeat = p.IsRepeat,
// IsPremiere = !p.PreviouslyShown.HasValue,
- IsKids = p.Categories.Any(info.KidsCategories.Contains),
- IsMovie = p.Categories.Any(info.MovieCategories.Contains),
- IsNews = p.Categories.Any(info.NewsCategories.Contains),
- IsSports = p.Categories.Any(info.SportsCategories.Contains),
+ 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)),
+ IsSports = p.Categories.Any(c => info.SportsCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)),
ImageUrl = p.Icon != null && !String.IsNullOrEmpty(p.Icon.Source) ? p.Icon.Source : null,
HasImage = p.Icon != null && !String.IsNullOrEmpty(p.Icon.Source),
OfficialRating = p.Rating != null && !String.IsNullOrEmpty(p.Rating.Value) ? p.Rating.Value : null,