diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-08-16 14:37:53 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-08-16 14:37:53 -0400 |
| commit | 061c363495699eda74787c4b74967a83269ae17e (patch) | |
| tree | c1e4af7e4919094605d290a589befbced654ae8b /MediaBrowser.Server.Implementations/LiveTv/Listings | |
| parent | 96e207acb307ae1b3c4c5761dd07a41d52969a58 (diff) | |
update live tv channel ids
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/Listings')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 8650d4bc45..c536d0e83f 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -307,6 +307,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings imageLink = details.images; } + var showType = details.showType ?? string.Empty; + var info = new ProgramInfo { ChannelId = channel, @@ -315,32 +317,29 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings StartDate = startAt, EndDate = endAt, Name = details.titles[0].title120 ?? "Unkown", - OfficialRating = "0", + OfficialRating = null, CommunityRating = null, EpisodeTitle = episodeTitle, Audio = audioType, IsHD = hdtv, IsRepeat = repeat, - IsSeries = - ((details.showType ?? "No ShowType") == "Series") || - (details.showType ?? "No ShowType") == "Miniseries", + IsSeries = showType.IndexOf("series", StringComparison.OrdinalIgnoreCase) != -1, ImageUrl = imageLink, HasImage = details.hasImageArtwork, IsNews = false, IsKids = false, - IsSports = - ((details.showType ?? "No ShowType") == "Sports non-event") || - (details.showType ?? "No ShowType") == "Sports event", + IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1, IsLive = false, - IsMovie = - (details.showType ?? "No ShowType") == "Feature Film" || - (details.showType ?? "No ShowType") == "TV Movie" || - (details.showType ?? "No ShowType") == "Short Film", + IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1, IsPremiere = false, - ShowId = programInfo.programID, - SeriesId = programInfo.programID.Substring(0, 10) + ShowId = programInfo.programID }; + if (info.IsSeries) + { + info.SeriesId = programInfo.programID.Substring(0, 10); + } + if (!string.IsNullOrWhiteSpace(details.originalAirDate)) { info.OriginalAirDate = DateTime.Parse(details.originalAirDate); |
