Browse Source

fix jellyfin and emby links (#320)

pull/321/head
Jason Dove 4 years ago committed by GitHub
parent
commit
cd2558e3e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 11
      ErsatzTV.Core/Scheduling/PlayoutBuilder.cs
  3. 2
      ErsatzTV/Shared/RemoteMediaSourceEditor.razor
  4. 2
      ErsatzTV/Shared/RemoteMediaSourcePathReplacementsEditor.razor
  5. 4
      ErsatzTV/Shared/RemoteMediaSources.razor

3
CHANGELOG.md

@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Fixed
- Fix error message displayed after building empty playout
- Fix Emby and Jellyfin links
## [0.0.52-alpha] - 2021-07-22
### Added

11
ErsatzTV.Core/Scheduling/PlayoutBuilder.cs

@ -403,8 +403,15 @@ namespace ErsatzTV.Core.Scheduling @@ -403,8 +403,15 @@ namespace ErsatzTV.Core.Scheduling
// remove any items outside the desired range
playout.Items.RemoveAll(old => old.FinishOffset < playoutStart || old.StartOffset > playoutFinish);
DateTimeOffset maxStartTime = playout.Items.Max(i => i.FinishOffset);
DateTimeOffset minCurrentTime = maxStartTime < currentTime ? maxStartTime : currentTime;
DateTimeOffset minCurrentTime = currentTime;
if (playout.Items.Any())
{
DateTimeOffset maxStartTime = playout.Items.Max(i => i.FinishOffset);
if (maxStartTime < currentTime)
{
minCurrentTime = maxStartTime;
}
}
playout.Anchor = new PlayoutAnchor
{

2
ErsatzTV/Shared/RemoteMediaSourceEditor.razor

@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
{
Either<BaseError, Unit> result = await SaveSecrets(_model);
result.Match(
_ => _navigationManager.NavigateTo($"/media/{Name.ToLowerInvariant()}"),
_ => _navigationManager.NavigateTo($"/media/sources/{Name.ToLowerInvariant()}"),
error =>
{
_snackbar.Add(error.Value, Severity.Error);

2
ErsatzTV/Shared/RemoteMediaSourcePathReplacementsEditor.razor

@ -132,7 +132,7 @@ @@ -132,7 +132,7 @@
_snackbar.Add($"Unexpected error saving path replacements: {error.Value}", Severity.Error);
_logger.LogError("Unexpected error saving path replacements: {Error}", error.Value);
},
() => _navigationManager.NavigateTo($"/media/{Name.ToLowerInvariant()}"));
() => _navigationManager.NavigateTo($"/media/sources/{Name.ToLowerInvariant()}"));
}
}

4
ErsatzTV/Shared/RemoteMediaSources.razor

@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
{
<MudButton Variant="Variant.Filled"
Color="Color.Primary"
Link="@($"/media/{Name.ToLowerInvariant()}/edit")"
Link="@($"/media/sources/{Name.ToLowerInvariant()}/edit")"
Class="mt-4">
Connect @Name
</MudButton>
@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
{
<MudButton Variant="Variant.Filled"
Color="Color.Secondary"
Link="@($"/media/{Name.ToLowerInvariant()}/edit")"
Link="@($"/media/sources/{Name.ToLowerInvariant()}/edit")"
Class="ml-4 mt-4">
Fix @Name Connection
</MudButton>

Loading…
Cancel
Save