Browse Source

fix xmltv generation when no block items are selected for guide (#1702)

pull/1703/head
Jason Dove 1 year ago committed by GitHub
parent
commit
48a504735c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .editorconfig
  2. 5
      ErsatzTV.Application/Channels/Commands/RefreshChannelDataHandler.cs

2
.editorconfig

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
[*]
charset=utf-8
end_of_line=lf
trim_trailing_whitespace=false
trim_trailing_whitespace=true
insert_final_newline=false
indent_style=space
indent_size=4

5
ErsatzTV.Application/Channels/Commands/RefreshChannelDataHandler.cs

@ -367,6 +367,11 @@ public class RefreshChannelDataHandler : IRequestHandler<RefreshChannelData> @@ -367,6 +367,11 @@ public class RefreshChannelDataHandler : IRequestHandler<RefreshChannelData>
TimeSpan groupDuration = groupFinish - groupStart;
var itemsToInclude = group.Filter(g => g.FillerKind is FillerKind.None).ToList();
if (itemsToInclude.Count == 0)
{
continue;
}
TimeSpan perItem = groupDuration / itemsToInclude.Count;
DateTimeOffset currentStart = new DateTimeOffset(groupStart, TimeSpan.Zero).ToLocalTime();

Loading…
Cancel
Save