Browse Source

fix xmltv filler bug (#944)

pull/945/head
Jason Dove 4 years ago committed by GitHub
parent
commit
2df360d7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 5
      ErsatzTV.Core/Iptv/ChannelGuide.cs

1
CHANGELOG.md

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- This only happens when the channel does not have a `Preferred Audio Language`
- Fix scanner crash caused by invalid mtime
- `VAAPI`: Downgrade libva from 2.15 to 2.14
- Fix bug with XMLTV that caused some filler to display with primary content details
### Added
- Add `Preferred Audio Title` feature

5
ErsatzTV.Core/Iptv/ChannelGuide.cs

@ -79,6 +79,7 @@ public class ChannelGuide @@ -79,6 +79,7 @@ public class ChannelGuide
foreach ((Channel channel, List<PlayoutItem> sorted) in sortedChannelItems.OrderBy(
kvp => decimal.Parse(kvp.Key.Number)))
{
// skip all filler that isn't pre-roll
var i = 0;
while (i < sorted.Count && sorted[i].FillerKind != FillerKind.None &&
sorted[i].FillerKind != FillerKind.PreRoll)
@ -90,7 +91,7 @@ public class ChannelGuide @@ -90,7 +91,7 @@ public class ChannelGuide
{
PlayoutItem startItem = sorted[i];
int j = i;
while (j + 1 < sorted.Count && sorted[j].FillerKind != FillerKind.None)
while (sorted[j].FillerKind != FillerKind.None && j + 1 < sorted.Count)
{
j++;
}
@ -98,7 +99,7 @@ public class ChannelGuide @@ -98,7 +99,7 @@ public class ChannelGuide
PlayoutItem displayItem = sorted[j];
bool hasCustomTitle = !string.IsNullOrWhiteSpace(startItem.CustomTitle);
int finishIndex = i;
int finishIndex = j;
while (finishIndex + 1 < sorted.Count && sorted[finishIndex + 1].GuideGroup == startItem.GuideGroup)
{
finishIndex++;

Loading…
Cancel
Save