aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-22 18:54:45 -0500
committerGitHub <noreply@github.com>2016-12-22 18:54:45 -0500
commit026e58eb16b839c31cd8fb16829265c2f9087a5d (patch)
tree656be3f3a30a5a532b1a17a0ad3b27fb91473b7b /Emby.Server.Implementations/LiveTv
parentef671725559ef394337343af510ecb557b700d17 (diff)
parent02f749c654a5af4525304ed3ee470ba40c6405b9 (diff)
Merge pull request #2364 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/LiveTv')
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs17
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveTvManager.cs2
2 files changed, 16 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 04fc78c958..e2446b16ff 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -422,7 +422,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
}
var showType = details.showType ?? string.Empty;
-
+
var info = new ProgramInfo
{
ChannelId = channel,
@@ -440,10 +440,23 @@ namespace Emby.Server.Implementations.LiveTv.Listings
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1,
- ShowId = programInfo.programID,
Etag = programInfo.md5
};
+ var showId = programInfo.programID ?? string.Empty;
+
+ // According to SchedulesDirect, these are generic, unidentified episodes
+ // SH005316560000
+ var hasUniqueShowId = !showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) ||
+ !showId.EndsWith("0000", StringComparison.OrdinalIgnoreCase);
+
+ if (!hasUniqueShowId)
+ {
+ showId = newID;
+ }
+
+ info.ShowId = showId;
+
if (programInfo.videoProperties != null)
{
info.IsHD = programInfo.videoProperties.Contains("hdtv", StringComparer.OrdinalIgnoreCase);
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index 525db4036d..62a0738c72 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -2647,7 +2647,7 @@ namespace Emby.Server.Implementations.LiveTv
public GuideInfo GetGuideInfo()
{
var startDate = DateTime.UtcNow;
- var endDate = startDate.AddDays(14);
+ var endDate = startDate.AddDays(GetGuideDays());
return new GuideInfo
{