mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-13 08:37:07 +00:00
Fix alternative Versions and prevent over fetching
This commit is contained in:
parent
98b561d62c
commit
aedd2b04a2
1 changed files with 6 additions and 1 deletions
|
|
@ -983,7 +983,7 @@ public sealed class BaseItemRepository
|
|||
BaseItemKind.Video,
|
||||
BaseItemKind.Movie
|
||||
};
|
||||
if (filter.IncludeItemTypes.Length == 0 || filter.IncludeItemTypes.Any(linkedChildTypes.Contains))
|
||||
if (filter.IncludeItemTypes.Length > 0 && filter.IncludeItemTypes.Any(linkedChildTypes.Contains))
|
||||
{
|
||||
dbQuery = dbQuery.Include(e => e.LinkedChildEntities);
|
||||
}
|
||||
|
|
@ -1399,6 +1399,10 @@ public sealed class BaseItemRepository
|
|||
}
|
||||
}
|
||||
|
||||
// This is necessary because LocalAlternateVersions resolution queries the database by path,
|
||||
// and newly imported alternate version items need to exist before we can link them
|
||||
context.SaveChanges();
|
||||
|
||||
var folderIds = tuples
|
||||
.Where(t => t.Item is Folder)
|
||||
.Select(t => t.Item.Id)
|
||||
|
|
@ -1603,6 +1607,7 @@ public sealed class BaseItemRepository
|
|||
}
|
||||
}
|
||||
|
||||
// Phase 2 commit: Save LinkedChildren changes
|
||||
context.SaveChanges();
|
||||
transaction.Commit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue