Compare commits

...
Author SHA1 Message Date
Jason Dove 5993f23ec5 update changelog for release v0.2.1-alpha [no ci] 2021-10-24 19:46:33 -05:00
Jason DoveandGitHub 417f35a834 fix saving dynamic start time (#453) 2021-10-24 18:18:22 -05:00
2 changed files with 15 additions and 5 deletions
+6 -1
View File
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
## [0.2.1-alpha] - 2021-10-24
### Fixed
- Fix saving dynamic start time on schedule items
## [0.2.0-alpha] - 2021-10-23
### Fixed
- Fix generated streams with mpeg2video
@@ -756,7 +760,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Initial release to facilitate testing outside of Docker.
[Unreleased]: https://github.com/jasongdove/ErsatzTV/compare/v0.2.0-alpha...HEAD
[Unreleased]: https://github.com/jasongdove/ErsatzTV/compare/v0.2.1-alpha...HEAD
[0.2.1-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.2.0-alpha...v0.2.1-alpha
[0.2.0-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.1.5-alpha...v0.2.0-alpha
[0.1.5-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.1.4-alpha...v0.1.5-alpha
[0.1.4-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.1.3-alpha...v0.1.4-alpha
@@ -169,7 +169,7 @@ namespace ErsatzTV.Application.ProgramSchedules.Commands
{
ProgramScheduleId = programSchedule.Id,
Index = index,
StartTime = FixDuration(item.StartTime.GetValueOrDefault()),
StartTime = FixStartTime(item.StartTime),
CollectionType = item.CollectionType,
CollectionId = item.CollectionId,
MultiCollectionId = item.MultiCollectionId,
@@ -188,7 +188,7 @@ namespace ErsatzTV.Application.ProgramSchedules.Commands
{
ProgramScheduleId = programSchedule.Id,
Index = index,
StartTime = FixDuration(item.StartTime.GetValueOrDefault()),
StartTime = FixStartTime(item.StartTime),
CollectionType = item.CollectionType,
CollectionId = item.CollectionId,
MultiCollectionId = item.MultiCollectionId,
@@ -207,7 +207,7 @@ namespace ErsatzTV.Application.ProgramSchedules.Commands
{
ProgramScheduleId = programSchedule.Id,
Index = index,
StartTime = FixDuration(item.StartTime.GetValueOrDefault()),
StartTime = FixStartTime(item.StartTime),
CollectionType = item.CollectionType,
CollectionId = item.CollectionId,
MultiCollectionId = item.MultiCollectionId,
@@ -227,7 +227,7 @@ namespace ErsatzTV.Application.ProgramSchedules.Commands
{
ProgramScheduleId = programSchedule.Id,
Index = index,
StartTime = FixDuration(item.StartTime.GetValueOrDefault()),
StartTime = FixStartTime(item.StartTime),
CollectionType = item.CollectionType,
CollectionId = item.CollectionId,
MultiCollectionId = item.MultiCollectionId,
@@ -249,5 +249,10 @@ namespace ErsatzTV.Application.ProgramSchedules.Commands
private static TimeSpan FixDuration(TimeSpan duration) =>
duration >= TimeSpan.FromDays(1) ? duration.Subtract(TimeSpan.FromDays(1)) : duration;
private static TimeSpan? FixStartTime(TimeSpan? startTime) =>
startTime.HasValue && startTime.Value >= TimeSpan.FromDays(1)
? startTime.Value.Subtract(TimeSpan.FromDays(1))
: startTime;
}
}