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 @@
"isRoot": true, "isRoot": true,
"tools": { "tools": {
"jetbrains.resharper.globaltools": { "jetbrains.resharper.globaltools": {
"version": "2023.2.0", "version": "2023.2.1",
"commands": [ "commands": [
"jb" "jb"
] ]

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

@ -9,7 +9,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Bugsnag" Version="3.1.0" /> <PackageReference Include="Bugsnag" Version="3.1.0" />
<PackageReference Include="CliWrap" Version="3.6.4" /> <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="LanguageExt.Core" Version="4.4.3" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" 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 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NSubstitute" Version="5.0.0" /> <PackageReference Include="NSubstitute" Version="5.0.0" />

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

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NSubstitute" Version="5.0.0" /> <PackageReference Include="NSubstitute" Version="5.0.0" />
<PackageReference Include="NUnit" Version="3.13.3" /> <PackageReference Include="NUnit" Version="3.13.3" />

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

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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="LanguageExt.Core" Version="4.4.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NSubstitute" Version="5.0.0" /> <PackageReference Include="NSubstitute" Version="5.0.0" />

2
ErsatzTV/ErsatzTV.csproj

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

2
ErsatzTV/Pages/Channels.razor

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

17
ErsatzTV/Pages/Movie.razor

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

Loading…
Cancel
Save