fix displaying local tv artwork in ui (#2136)
This commit is contained in:
@@ -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}";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user