mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 22:35:17 -04:00
Collection Rework (#2830)
This commit is contained in:
@@ -19,6 +19,23 @@ public static class IncludesExtensions
|
||||
queryable = queryable.Include(c => c.SeriesMetadatas);
|
||||
}
|
||||
|
||||
if (includes.HasFlag(CollectionTagIncludes.SeriesMetadataWithSeries))
|
||||
{
|
||||
queryable = queryable.Include(c => c.SeriesMetadatas).ThenInclude(s => s.Series);
|
||||
}
|
||||
|
||||
return queryable.AsSplitQuery();
|
||||
}
|
||||
|
||||
public static IQueryable<AppUserCollection> Includes(this IQueryable<AppUserCollection> queryable,
|
||||
CollectionIncludes includes)
|
||||
{
|
||||
if (includes.HasFlag(CollectionIncludes.Series))
|
||||
{
|
||||
queryable = queryable.Include(c => c.Items);
|
||||
}
|
||||
|
||||
|
||||
return queryable.AsSplitQuery();
|
||||
}
|
||||
|
||||
@@ -206,6 +223,12 @@ public static class IncludesExtensions
|
||||
query = query.Include(u => u.ExternalSources);
|
||||
}
|
||||
|
||||
if (includeFlags.HasFlag(AppUserIncludes.Collections))
|
||||
{
|
||||
query = query.Include(u => u.Collections)
|
||||
.ThenInclude(c => c.Items);
|
||||
}
|
||||
|
||||
return query.AsSplitQuery();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user