diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-03-01 15:30:05 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-03-01 15:30:05 -0500 |
| commit | 17e42e68f60886ded225b4b348c790fd8f10f8de (patch) | |
| tree | f12a219d4d4304153237ccb43d3f07b97b83c89c | |
| parent | cd45b0b69c5daac62dec333c7d74199ffd0bba59 (diff) | |
update series definitions
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index f76735030..a36cb124d 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -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,7 +337,11 @@ namespace Emby.Server.Implementations.LiveTv.Listings { var gracenote = details.metadata.Find(x => x.Gracenote != null).Gracenote; info.SeasonNumber = gracenote.season; - info.EpisodeNumber = gracenote.episode; + + if (gracenote.episode > 0) + { + info.EpisodeNumber = gracenote.episode; + } } } |
