fix sorting episodes without metadata (#353)

This commit is contained in:
Jason Dove
2021-09-08 22:12:47 -05:00
committed by GitHub
parent f6680f29e7
commit f1f09bd4cb
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Properly order elements
- Omit channels with no programmes
- Properly identify channels using the format number.etv like `15.etv`
- Fix sorting episodes without episode metadata
- This bug prevented playouts from building and was most often seen when grouping multi-part episodes, as shows are sorted chronologically before checking for multi-part episodes
## [0.0.55-alpha] - 2021-09-03
### Fixed
@@ -66,13 +66,17 @@ namespace ErsatzTV.Core.Scheduling
int episode1 = x switch
{
Episode e => e.EpisodeMetadata.Max(em => em.EpisodeNumber),
Episode e => e.EpisodeMetadata.HeadOrNone().Match(
em => em.EpisodeNumber,
() => int.MaxValue),
_ => int.MaxValue
};
int episode2 = y switch
{
Episode e => e.EpisodeMetadata.Max(em => em.EpisodeNumber),
Episode e => e.EpisodeMetadata.HeadOrNone().Match(
em => em.EpisodeNumber,
() => int.MaxValue),
_ => int.MaxValue
};