Browse Source

more mysql ui fixes (#2349)

pull/2350/head
Jason Dove 4 months ago committed by GitHub
parent
commit
a6198892f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 19
      ErsatzTV/Pages/Artist.razor
  3. 12
      ErsatzTV/Pages/TelevisionSeasonList.razor

2
CHANGELOG.md

@ -83,7 +83,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -83,7 +83,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix song playback in playback troubleshooting
- Fix seeking into extracted text subtitles
- Fix error when changing default (lowest priority) alternate schedule
- Fix editing remote libraries with MySql/MariaDB
- Fix remote library editing, tv shows, artists with MySql/MariaDB
### Changed
- Rename some schedule and playout terms for clarity

19
ErsatzTV/Pages/Artist.razor

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
@using ErsatzTV.Application.MediaCards
@using ErsatzTV.Application.MediaCollections
@using ErsatzTV.Application.ProgramSchedules
@using ErsatzTV.Core.Search
@using ErsatzTV.Extensions
@implements IDisposable
@inject IMediator Mediator
@ -14,7 +15,7 @@ @@ -14,7 +15,7 @@
<MudContainer MaxWidth="MaxWidth.False" Style="padding: 0" Class="fanart-container">
<div class="fanart-tint"></div>
@if (!string.IsNullOrWhiteSpace(_artist.FanArt))
@if (!string.IsNullOrWhiteSpace(_artist?.FanArt))
{
<img src="@($"artwork/fanart/{_artist.FanArt}")" alt="fan art"/>
}
@ -25,7 +26,7 @@ @@ -25,7 +26,7 @@
</MudContainer>
<MudContainer MaxWidth="MaxWidth.Large" Style="margin-top: 100px" Class="z-10">
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Spacing="6">
@if (!string.IsNullOrWhiteSpace(_artist.Thumbnail))
@if (!string.IsNullOrWhiteSpace(_artist?.Thumbnail))
{
<MudImage Elevation="2" Src="@($"artwork/thumbnails/{_artist.Thumbnail}")" Class="rounded-lg z-10" Style="height: 220px; width: 220px; margin-left: auto; margin-right: auto;"/>
}
@ -41,11 +42,11 @@ @@ -41,11 +42,11 @@
<MudHidden Invert="true" Breakpoint="Breakpoint.MdAndUp">
<MudText Typo="Typo.h2" Class="media-item-title">@_artist?.Name</MudText>
</MudHidden>
<MudText Typo="Typo.subtitle1" Class="media-item-subtitle mb-6 mud-text-secondary">@_artist.Disambiguation</MudText>
<MudText Typo="Typo.subtitle1" Class="media-item-subtitle mb-6 mud-text-secondary">@_artist?.Disambiguation</MudText>
</MudStack>
<MudCard Elevation="2" Class="mb-6">
<MudCardContent Class="mx-3 my-3" Style="height: 100%">
@if (!string.IsNullOrWhiteSpace(_artist.Biography))
@if (!string.IsNullOrWhiteSpace(_artist?.Biography))
{
<MudText Style="flex-grow: 1">
@if (_artist.Biography.Length > 400)
@ -248,11 +249,11 @@ @@ -248,11 +249,11 @@
public int ArtistId { get; set; }
private ArtistViewModel _artist;
private List<CultureInfo> _sortedLanguages = new();
private List<string> _sortedGenres = new();
private List<string> _sortedStyles = new();
private List<string> _sortedMoods = new();
private MusicVideoCardResultsViewModel _musicVideos;
private List<CultureInfo> _sortedLanguages = [];
private List<string> _sortedGenres = [];
private List<string> _sortedStyles = [];
private List<string> _sortedMoods = [];
private MusicVideoCardResultsViewModel _musicVideos = new(0, [], new SearchPageMap([]));
public void Dispose()
{

12
ErsatzTV/Pages/TelevisionSeasonList.razor

@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
</MudContainer>
<MudContainer MaxWidth="MaxWidth.Large" Style="margin-top: 100px" Class="z-10">
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Spacing="6">
<MudImage Src="@GetPosterUrl(_show.Poster)" Elevation="2" Class="rounded-lg z-10" Style="max-height: 325px; margin-left: auto; margin-right: auto"/>
<MudImage Src="@GetPosterUrl(_show?.Poster)" Elevation="2" Class="rounded-lg z-10" Style="max-height: 325px; margin-left: auto; margin-right: auto"/>
<MudStack Row="false" Style="flex: 1" Class="z-10">
<MudStack Row="false">
<MudHidden Invert="true" Breakpoint="Breakpoint.SmAndDown">
@ -285,7 +285,15 @@ @@ -285,7 +285,15 @@
}
}
private static string GetPosterUrl(string poster) => poster.StartsWith("http://") || poster.StartsWith("https://") ? poster : $"artwork/posters/{poster}";
private static string GetPosterUrl(string poster)
{
if (string.IsNullOrWhiteSpace(poster))
{
return poster;
}
return poster.StartsWith("http://") || poster.StartsWith("https://") ? poster : $"artwork/posters/{poster}";
}
private async Task ScanShow(bool deepScan)
{

Loading…
Cancel
Save