mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Cleanup hotfix thanks to the new option in Projectable
This commit is contained in:
parent
d136b98411
commit
c9c1ac5126
@ -8,7 +8,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="7.1.0" />
|
||||
<PackageReference Include="EntityFrameworkCore.Projectables" Version="4.0.1-prebeta" />
|
||||
<PackageReference Include="EntityFrameworkCore.Projectables" Version="4.1.0-prebeta" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
|
||||
|
@ -157,7 +157,7 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The previous episode that should be seen before viewing this one.
|
||||
/// </summary>
|
||||
[Projectable(UseMemberBody = nameof(_PreviousEpisode))]
|
||||
[Projectable(UseMemberBody = nameof(_PreviousEpisode), OnlyOnInclude = true)]
|
||||
[LoadableRelation] public Episode? PreviousEpisode { get; set; }
|
||||
|
||||
private Episode? _PreviousEpisode => Show!.Episodes!
|
||||
@ -173,7 +173,7 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The next episode to watch after this one.
|
||||
/// </summary>
|
||||
[Projectable(UseMemberBody = nameof(_NextEpisode))]
|
||||
[Projectable(UseMemberBody = nameof(_NextEpisode), OnlyOnInclude = true)]
|
||||
[LoadableRelation] public Episode? NextEpisode { get; set; }
|
||||
|
||||
private Episode? _NextEpisode => Show!.Episodes!
|
||||
|
@ -273,9 +273,7 @@ namespace Kyoo.Core.Controllers
|
||||
{
|
||||
if (include == null)
|
||||
return query;
|
||||
foreach (string field in include.Fields
|
||||
// TODO: Remove this hotfix
|
||||
.Where(x => x != "NextEpisode" && x != "PreviousEpisode"))
|
||||
foreach (string field in include.Fields)
|
||||
query = query.Include(field);
|
||||
return query;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="7.0.2" />
|
||||
<PackageReference Include="EntityFrameworkCore.Projectables" Version="4.0.1-prebeta" />
|
||||
<PackageReference Include="EntityFrameworkCore.Projectables" Version="4.1.0-prebeta" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.12">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
Loading…
x
Reference in New Issue
Block a user