mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #6071 from BaronGreenback/DLNAFolderFixPart1
Make DLNA folders to work as expected.
This commit is contained in:
commit
f17d43c564
@ -987,7 +987,13 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
items = GetChildren(user, true).Where(filter);
|
// need to pass this param to the children.
|
||||||
|
var childQuery = new InternalItemsQuery
|
||||||
|
{
|
||||||
|
DisplayAlbumFolders = query.DisplayAlbumFolders
|
||||||
|
};
|
||||||
|
|
||||||
|
items = GetChildren(user, true, childQuery).Where(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
return PostFilterAndSort(items, query, true);
|
return PostFilterAndSort(items, query, true);
|
||||||
@ -1325,7 +1331,21 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void AddChildren(User user, bool includeLinkedChildren, Dictionary<Guid, BaseItem> result, bool recursive, InternalItemsQuery query)
|
private void AddChildren(User user, bool includeLinkedChildren, Dictionary<Guid, BaseItem> result, bool recursive, InternalItemsQuery query)
|
||||||
{
|
{
|
||||||
foreach (var child in GetEligibleChildrenForRecursiveChildren(user))
|
// If Query.AlbumFolders is set, then enforce the format as per the db in that it permits sub-folders in music albums.
|
||||||
|
IEnumerable<BaseItem> children = null;
|
||||||
|
if ((query?.DisplayAlbumFolders ?? false) && (this is MusicAlbum))
|
||||||
|
{
|
||||||
|
children = Children;
|
||||||
|
query = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there are not sub-folders, proceed as normal.
|
||||||
|
if (children == null)
|
||||||
|
{
|
||||||
|
children = GetEligibleChildrenForRecursiveChildren(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var child in children)
|
||||||
{
|
{
|
||||||
bool? isVisibleToUser = null;
|
bool? isVisibleToUser = null;
|
||||||
|
|
||||||
|
@ -265,6 +265,11 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
public bool? IsDeadPerson { get; set; }
|
public bool? IsDeadPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether album sub-folders should be returned if they exist.
|
||||||
|
/// </summary>
|
||||||
|
public bool? DisplayAlbumFolders { get; set; }
|
||||||
|
|
||||||
public InternalItemsQuery()
|
public InternalItemsQuery()
|
||||||
{
|
{
|
||||||
AlbumArtistIds = Array.Empty<Guid>();
|
AlbumArtistIds = Array.Empty<Guid>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user