update series definitions

This commit is contained in:
Luke Pulverenti 2017-03-01 15:30:05 -05:00
parent cd45b0b69c
commit 17e42e68f6

View File

@ -282,6 +282,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings
var showId = programInfo.programID ?? string.Empty;
if (!info.IsSeries)
{
// It's also a series if it starts with SH
info.IsSeries = showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) && showId.Length >= 14;
}
// According to SchedulesDirect, these are generic, unidentified episodes
// SH005316560000
var hasUniqueShowId = !showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) ||
@ -331,9 +337,13 @@ namespace Emby.Server.Implementations.LiveTv.Listings
{
var gracenote = details.metadata.Find(x => x.Gracenote != null).Gracenote;
info.SeasonNumber = gracenote.season;
if (gracenote.episode > 0)
{
info.EpisodeNumber = gracenote.episode;
}
}
}
if (!string.IsNullOrWhiteSpace(details.originalAirDate) && (!info.IsSeries || info.IsRepeat))
{