* replace media items tables with card grids * style cleanup * add basic paging * sort and page in the db * optimize sql for movies * support movie posters * resize movie posters and store in cache with channel logos * fix bug preventing folders with more than 50 chars as local media sources * support tv posters
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
@using ErsatzTV.Application.MediaItems
|
|
<div class="media-card-container mx-3 pb-3">
|
|
<MudPaper Class="media-card">
|
|
@if (!string.IsNullOrWhiteSpace(Data.Poster))
|
|
{
|
|
<img src="@($"/posters/{Data.Poster}")" style="max-height: 220px"/>
|
|
}
|
|
else
|
|
{
|
|
<MudText Align="Align.Center" Typo="Typo.h1" Class="media-card-poster-placeholder mud-text-disabled">
|
|
@Placeholder(Data.SortTitle)
|
|
</MudText>
|
|
}
|
|
</MudPaper>
|
|
<MudText Align="Align.Center" Class="media-card-title" UserAttributes="@(new Dictionary<string, object> { { "title", Data.Title } })">
|
|
@Data.Title
|
|
</MudText>
|
|
<MudText Typo="Typo.body2" Align="Align.Center" Class="mud-text-secondary">
|
|
@Data.Subtitle
|
|
</MudText>
|
|
</div>
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
public AggregateMediaItemViewModel Data { get; set; }
|
|
|
|
private string Placeholder(string sortTitle)
|
|
{
|
|
string first = sortTitle.Substring(0, 1).ToUpperInvariant();
|
|
return int.TryParse(first, out _) ? "#" : first;
|
|
}
|
|
|
|
} |