fix displaying local tv artwork in ui (#2136)

This commit is contained in:
Jason Dove
2025-07-11 14:44:16 +00:00
committed by GitHub
parent 1a09bb26d7
commit e79a03b522
2 changed files with 9 additions and 4 deletions
+7 -2
View File
@@ -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 @@
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}";
}
}
+2 -2
View File
@@ -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 @@
Add To Schedule
</MudButton>
</MudStack>
</div>
</MudStack>
</MudStack>
<MudCard Class="mt-6 mb-6">
<MudCardContent>