Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d7ec59088 | ||
|
|
d78976f80a | ||
|
|
0f5fee99c6 | ||
|
|
d5bfd1a254 | ||
|
|
cd2558e3e6 |
+10
-1
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.53-alpha] - 2021-08-01
|
||||
### Fixed
|
||||
- Fix error message displayed after building empty playout
|
||||
- Fix Emby and Jellyfin links
|
||||
|
||||
### Changed
|
||||
- Always proxy Jellyfin and Emby artwork; this fixes artwork in some networking scenarios
|
||||
|
||||
## [0.0.52-alpha] - 2021-07-22
|
||||
### Added
|
||||
- Add multiple local libraries to better organize your media
|
||||
@@ -528,7 +536,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.0.52-alpha...HEAD
|
||||
[Unreleased]: https://github.com/jasongdove/ErsatzTV/compare/v0.0.53-alpha...HEAD
|
||||
[0.0.53-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.0.52-alpha...v0.0.53-alpha
|
||||
[0.0.52-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.0.51-alpha...v0.0.52-alpha
|
||||
[0.0.51-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.0.50-alpha...v0.0.51-alpha
|
||||
[0.0.50-alpha]: https://github.com/jasongdove/ErsatzTV/compare/v0.0.49-prealpha...v0.0.50-alpha
|
||||
|
||||
@@ -123,12 +123,12 @@ namespace ErsatzTV.Application.MediaCards
|
||||
|
||||
if (maybeJellyfin.IsSome && artwork.StartsWith("jellyfin://"))
|
||||
{
|
||||
artwork = JellyfinUrl.ForArtwork(maybeJellyfin, artwork)
|
||||
artwork = JellyfinUrl.RelativeProxyForArtwork(artwork)
|
||||
.SetQueryParam("fillHeight", 440);
|
||||
}
|
||||
else if (maybeEmby.IsSome && artwork.StartsWith("emby://"))
|
||||
{
|
||||
artwork = EmbyUrl.ForArtwork(maybeEmby, artwork)
|
||||
artwork = EmbyUrl.RelativeProxyForArtwork(artwork)
|
||||
.SetQueryParam("maxHeight", 440);
|
||||
}
|
||||
|
||||
@@ -171,12 +171,12 @@ namespace ErsatzTV.Application.MediaCards
|
||||
|
||||
if (maybeJellyfin.IsSome && poster.StartsWith("jellyfin://"))
|
||||
{
|
||||
poster = JellyfinUrl.ForArtwork(maybeJellyfin, poster)
|
||||
poster = JellyfinUrl.RelativeProxyForArtwork(poster)
|
||||
.SetQueryParam("fillHeight", 440);
|
||||
}
|
||||
else if (maybeEmby.IsSome && poster.StartsWith("emby://"))
|
||||
{
|
||||
poster = EmbyUrl.ForArtwork(maybeEmby, poster)
|
||||
poster = EmbyUrl.RelativeProxyForArtwork(poster)
|
||||
.SetQueryParam("maxHeight", 440);
|
||||
}
|
||||
|
||||
@@ -193,12 +193,12 @@ namespace ErsatzTV.Application.MediaCards
|
||||
|
||||
if (maybeJellyfin.IsSome && thumb.StartsWith("jellyfin://"))
|
||||
{
|
||||
thumb = JellyfinUrl.ForArtwork(maybeJellyfin, thumb)
|
||||
thumb = JellyfinUrl.RelativeProxyForArtwork(thumb)
|
||||
.SetQueryParam("fillHeight", 220);
|
||||
}
|
||||
else if (maybeEmby.IsSome && thumb.StartsWith("emby://"))
|
||||
{
|
||||
thumb = EmbyUrl.ForArtwork(maybeEmby, thumb)
|
||||
thumb = EmbyUrl.RelativeProxyForArtwork(thumb)
|
||||
.SetQueryParam("maxHeight", 220);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace ErsatzTV.Application.Movies
|
||||
|
||||
if (maybeJellyfin.IsSome && artwork.StartsWith("jellyfin://"))
|
||||
{
|
||||
Url url = JellyfinUrl.ForArtwork(maybeJellyfin, artwork);
|
||||
Url url = JellyfinUrl.RelativeProxyForArtwork(artwork);
|
||||
if (artworkKind is ArtworkKind.Poster or ArtworkKind.Thumbnail)
|
||||
{
|
||||
url.SetQueryParam("fillHeight", 440);
|
||||
@@ -76,7 +76,7 @@ namespace ErsatzTV.Application.Movies
|
||||
}
|
||||
else if (maybeEmby.IsSome && artwork.StartsWith("emby://"))
|
||||
{
|
||||
Url url = EmbyUrl.ForArtwork(maybeEmby, artwork);
|
||||
Url url = EmbyUrl.RelativeProxyForArtwork(artwork);
|
||||
if (artworkKind is ArtworkKind.Poster or ArtworkKind.Thumbnail)
|
||||
{
|
||||
url.SetQueryParam("maxHeight", 440);
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace ErsatzTV.Application.Television
|
||||
|
||||
if (maybeJellyfin.IsSome && artwork.StartsWith("jellyfin://"))
|
||||
{
|
||||
Url url = JellyfinUrl.ForArtwork(maybeJellyfin, artwork);
|
||||
Url url = JellyfinUrl.RelativeProxyForArtwork(artwork);
|
||||
if (artworkKind == ArtworkKind.Poster)
|
||||
{
|
||||
url.SetQueryParam("fillHeight", 440);
|
||||
@@ -90,7 +90,7 @@ namespace ErsatzTV.Application.Television
|
||||
}
|
||||
else if (maybeEmby.IsSome && artwork.StartsWith("emby://"))
|
||||
{
|
||||
Url url = EmbyUrl.ForArtwork(maybeEmby, artwork);
|
||||
Url url = EmbyUrl.RelativeProxyForArtwork(artwork);
|
||||
if (artworkKind == ArtworkKind.Poster)
|
||||
{
|
||||
url.SetQueryParam("maxHeight", 440);
|
||||
|
||||
@@ -63,5 +63,21 @@ namespace ErsatzTV.Core.Emby
|
||||
.AppendPathSegment(pathSegment)
|
||||
.SetQueryParams(query);
|
||||
}
|
||||
|
||||
public static Url RelativeProxyForArtwork(string artwork)
|
||||
{
|
||||
string[] split = artwork.Replace("emby://", string.Empty).Split('?');
|
||||
if (split.Length != 2)
|
||||
{
|
||||
return artwork;
|
||||
}
|
||||
|
||||
string pathSegment = split[0];
|
||||
QueryParamCollection query = Url.ParseQueryParams(split[1]);
|
||||
|
||||
return Url.Parse("emby")
|
||||
.AppendPathSegment(pathSegment)
|
||||
.SetQueryParams(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,5 +63,22 @@ namespace ErsatzTV.Core.Jellyfin
|
||||
.AppendPathSegment(pathSegment)
|
||||
.SetQueryParams(query);
|
||||
}
|
||||
|
||||
public static Url RelativeProxyForArtwork(string artwork)
|
||||
{
|
||||
string[] split = artwork.Replace("jellyfin://", string.Empty).Split('?');
|
||||
if (split.Length != 2)
|
||||
{
|
||||
return artwork;
|
||||
}
|
||||
|
||||
string pathSegment = split[0];
|
||||
QueryParamCollection query = Url.ParseQueryParams(split[1]);
|
||||
|
||||
return Url.Parse("jellyfin")
|
||||
.AppendPathSegment(pathSegment)
|
||||
.SetQueryParams(query);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace ErsatzTV.Controllers
|
||||
[HttpGet("/artwork/posters/jellyfin/{*path}")]
|
||||
[HttpGet("/iptv/artwork/thumbnails/jellyfin/{*path}")]
|
||||
[HttpGet("/artwork/thumbnails/jellyfin/{*path}")]
|
||||
[HttpGet("/artwork/fanart/jellyfin/{*path}")]
|
||||
public Task<IActionResult> GetJellyfin(string path)
|
||||
{
|
||||
if (Request.QueryString.HasValue)
|
||||
@@ -85,6 +86,7 @@ namespace ErsatzTV.Controllers
|
||||
[HttpGet("/artwork/posters/emby/{*path}")]
|
||||
[HttpGet("/iptv/artwork/thumbnails/emby/{*path}")]
|
||||
[HttpGet("/artwork/thumbnails/emby/{*path}")]
|
||||
[HttpGet("/artwork/fanart/emby/{*path}")]
|
||||
public Task<IActionResult> GetEmby(string path)
|
||||
{
|
||||
if (Request.QueryString.HasValue)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MudBlazor" Version="5.0.15" />
|
||||
<PackageReference Include="MudBlazor" Version="5.1.0" />
|
||||
<PackageReference Include="NaturalSort.Extension" Version="3.1.0" />
|
||||
<PackageReference Include="PPioli.FluentValidation.Blazor" Version="5.0.0" />
|
||||
<PackageReference Include="Refit.HttpClientFactory" Version="6.0.38" />
|
||||
|
||||
@@ -161,7 +161,6 @@
|
||||
{
|
||||
<MediaCard Data="@actor"
|
||||
Link="@(@$"actor:""{actor.Name.ToLowerInvariant()}""".GetRelativeSearchQuery())"
|
||||
IsRemoteArtwork="true"
|
||||
ArtworkKind="ArtworkKind.Thumbnail"/>
|
||||
}
|
||||
</MudContainer>
|
||||
|
||||
@@ -162,7 +162,6 @@
|
||||
{
|
||||
<MediaCard Data="@actor"
|
||||
Link="@(@$"actor:""{actor.Name.ToLowerInvariant()}""".GetRelativeSearchQuery())"
|
||||
IsRemoteArtwork="true"
|
||||
ArtworkKind="ArtworkKind.Thumbnail"/>
|
||||
}
|
||||
</MudContainer>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()}"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 @@
|
||||
{
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user