Skip to content

The Free Software Media System - Server Backend & API

Set Parent to current query Item if ParentId is empty (#680)

Claus Viumb2ffad9ce946
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 2103e0045b..dab96509c7 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -644,12 +644,9 @@ namespace MediaBrowser.Controller.Entities
return PostFilterAndSort(items, query, true);
}
- if (!(this is UserRootFolder) && !(this is AggregateFolder))
+ if (!(this is UserRootFolder) && !(this is AggregateFolder) && query.ParentId == Guid.Empty)
{
- if (!query.ParentId.Equals(Guid.Empty))
- {
- query.Parent = this;
- }
+ query.Parent = this;
}
if (RequiresPostFiltering2(query))