Browse Source

fix displaying local tv artwork in ui (#2136)

pull/2138/head
Jason Dove 1 month ago committed by GitHub
parent
commit
e79a03b522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      ErsatzTV/Pages/TelevisionEpisodeList.razor
  2. 4
      ErsatzTV/Pages/TelevisionSeasonList.razor

9
ErsatzTV/Pages/TelevisionEpisodeList.razor

@ -78,10 +78,10 @@ @@ -78,10 +78,10 @@
{
<div style="display: flex; flex-direction: column; position: relative">
<MudHidden Invert="true" Breakpoint="Breakpoint.SmAndDown">
<MudImage Src="@GetPosterUrl(episode.Poster)" Style="max-height: 220px; max-width: 265px; margin-left: auto; margin-right: auto;"/>
<MudImage Src="@GetThumbnailUrl(episode.Poster)" Style="max-height: 220px; max-width: 265px; margin-left: auto; margin-right: auto;"/>
</MudHidden>
<MudHidden Invert="true" Breakpoint="Breakpoint.MdAndUp">
<MudImage Src="@GetPosterUrl(episode.Poster)" Style="max-height: 220px; max-width: 392px; margin-left: auto; margin-right: auto;"/>
<MudImage Src="@GetThumbnailUrl(episode.Poster)" Style="max-height: 220px; max-width: 392px; margin-left: auto; margin-right: auto;"/>
</MudHidden>
@if (episode.State == MediaItemState.FileNotFound)
{
@ -333,4 +333,9 @@ @@ -333,4 +333,9 @@
return poster.StartsWith("http://") || poster.StartsWith("https://") ? poster : $"artwork/posters/{poster}";
}
private static string GetThumbnailUrl(string poster)
{
return poster.StartsWith("http://") || poster.StartsWith("https://") ? poster : $"artwork/thumbnails/{poster}";
}
}

4
ErsatzTV/Pages/TelevisionSeasonList.razor

@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
<MudContainer MaxWidth="MaxWidth.Large" Style="margin-top: 100px">
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Spacing="6">
<MudImage Src="@GetPosterUrl(_show.Poster)" Elevation="2" Class="rounded-lg" Style="max-height: 325px; margin-left: auto; margin-right: auto" />
<div style="display: flex; flex-direction: column; height: 100%">
<MudStack Row="false" Style="flex: 1">
<MudStack Row="false">
<MudHidden Invert="true" Breakpoint="Breakpoint.SmAndDown">
<MudText Typo="Typo.h4" Class="media-item-title">@_show?.Title</MudText>
@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
Add To Schedule
</MudButton>
</MudStack>
</div>
</MudStack>
</MudStack>
<MudCard Class="mt-6 mb-6">
<MudCardContent>

Loading…
Cancel
Save