fix sorting episodes without metadata (#353)
This commit is contained in:
@@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Properly order elements
|
- Properly order elements
|
||||||
- Omit channels with no programmes
|
- Omit channels with no programmes
|
||||||
- Properly identify channels using the format number.etv like `15.etv`
|
- 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
|
## [0.0.55-alpha] - 2021-09-03
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -66,13 +66,17 @@ namespace ErsatzTV.Core.Scheduling
|
|||||||
|
|
||||||
int episode1 = x switch
|
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.MaxValue
|
||||||
};
|
};
|
||||||
|
|
||||||
int episode2 = y switch
|
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
|
_ => int.MaxValue
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user