Browse Source

more mysql fixes (#1397)

* fix channels and movie page crashes with mysql

* update dependencies
pull/1398/head
Jason Dove 2 years ago committed by GitHub
parent
commit
20d224fcfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .config/dotnet-tools.json
  2. 2
      ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj
  3. 2
      ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj
  4. 2
      ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj
  5. 2
      ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj
  6. 2
      ErsatzTV/ErsatzTV.csproj
  7. 2
      ErsatzTV/Pages/Channels.razor
  8. 17
      ErsatzTV/Pages/Movie.razor

2
.config/dotnet-tools.json

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2023.2.0",
"version": "2023.2.1",
"commands": [
"jb"
]

2
ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Bugsnag" Version="3.1.0" />
<PackageReference Include="CliWrap" Version="3.6.4" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="LanguageExt.Core" Version="4.4.3" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />

2
ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NSubstitute" Version="5.0.0" />

2
ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NSubstitute" Version="5.0.0" />
<PackageReference Include="NUnit" Version="3.13.3" />

2
ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="LanguageExt.Core" Version="4.4.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NSubstitute" Version="5.0.0" />

2
ErsatzTV/ErsatzTV.csproj

@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
<PackageReference Include="Refit.HttpClientFactory" Version="7.0.0" />
<PackageReference Include="Serilog" Version="3.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.1" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />

2
ErsatzTV/Pages/Channels.razor

@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
private readonly CancellationTokenSource _cts = new();
private MudTable<ChannelViewModel> _table;
private List<FFmpegProfileViewModel> _ffmpegProfiles;
private List<FFmpegProfileViewModel> _ffmpegProfiles = new();
private int _rowsPerPage = 10;

17
ErsatzTV/Pages/Movie.razor

@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
@page "/media/movies/{MovieId:int}"
@using ErsatzTV.Extensions
@using ErsatzTV.Application.Movies
@using System.Globalization
@using ErsatzTV.Application.MediaCollections
@using ErsatzTV.Application.MediaItems
@using ErsatzTV.Application.MediaCards
@ -16,7 +15,7 @@ @@ -16,7 +15,7 @@
<MudContainer MaxWidth="MaxWidth.False" Style="padding: 0" Class="fanart-container">
<div class="fanart-tint"></div>
@if (!string.IsNullOrWhiteSpace(_movie.FanArt))
@if (!string.IsNullOrWhiteSpace(_movie?.FanArt))
{
if (_movie.FanArt.StartsWith("http://") || _movie.FanArt.StartsWith("https://"))
{
@ -30,7 +29,7 @@ @@ -30,7 +29,7 @@
</MudContainer>
<MudContainer MaxWidth="MaxWidth.Large" Style="margin-top: 200px">
<div style="display: flex; flex-direction: row;" class="mb-6">
@if (!string.IsNullOrWhiteSpace(_movie.Poster))
@if (!string.IsNullOrWhiteSpace(_movie?.Poster))
{
<div class="mr-6" style="display: flex; flex-direction: column; max-height: 440px; position: relative">
@if (_movie.Poster.StartsWith("http://") || _movie.Poster.StartsWith("https://"))
@ -60,9 +59,9 @@ @@ -60,9 +59,9 @@
</div>
}
<div style="display: flex; flex-direction: column; height: 100%">
<MudText Typo="Typo.h2" Class="media-item-title">@_movie.Title</MudText>
<MudText Typo="Typo.subtitle1" Class="media-item-subtitle mb-6 mud-text-secondary">@_movie.Year</MudText>
@if (!string.IsNullOrWhiteSpace(_movie.Plot))
<MudText Typo="Typo.h2" Class="media-item-title">@_movie?.Title</MudText>
<MudText Typo="Typo.subtitle1" Class="media-item-subtitle mb-6 mud-text-secondary">@_movie?.Year</MudText>
@if (!string.IsNullOrWhiteSpace(_movie?.Plot))
{
<MudCard Elevation="2" Class="mb-6">
<MudCardContent Class="mx-3 my-3" Style="height: 100%">
@ -89,7 +88,7 @@ @@ -89,7 +88,7 @@
</div>
</div>
</div>
@if (_movie.MediaItemState == MediaItemState.FileNotFound)
@if (_movie?.MediaItemState == MediaItemState.FileNotFound)
{
<MudCard Class="mb-6">
<MudCardContent>
@ -101,7 +100,7 @@ @@ -101,7 +100,7 @@
</MudCardContent>
</MudCard>
}
else if (_movie.MediaItemState == MediaItemState.Unavailable)
else if (_movie?.MediaItemState == MediaItemState.Unavailable)
{
<MudCard Class="mb-6">
<MudCardContent>
@ -202,7 +201,7 @@ @@ -202,7 +201,7 @@
</MudCardContent>
</MudCard>
</MudContainer>
@if (_movie.Actors.Any())
@if (_movie is not null && _movie.Actors.Any())
{
<MudContainer MaxWidth="MaxWidth.Large">
<MudText Class="mb-4">Actors</MudText>

Loading…
Cancel
Save