|
|
@ -1,5 +1,4 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Concurrent;
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
@ -69,13 +68,21 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
return NullTaskResult;
|
|
|
|
return NullTaskResult;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<LinkedChild> _linkedChildren;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Our children are actually just references to the ones in the physical root...
|
|
|
|
/// Our children are actually just references to the ones in the physical root...
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The linked children.</value>
|
|
|
|
/// <value>The linked children.</value>
|
|
|
|
public override List<LinkedChild> LinkedChildren
|
|
|
|
public override List<LinkedChild> LinkedChildren
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get { return _linkedChildren ?? (_linkedChildren = GetLinkedChildrenInternal()); }
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
base.LinkedChildren = value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private List<LinkedChild> GetLinkedChildrenInternal()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Dictionary<string, string> locationsDicionary;
|
|
|
|
Dictionary<string, string> locationsDicionary;
|
|
|
|
|
|
|
|
|
|
|
@ -93,21 +100,20 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
.OfType<Folder>()
|
|
|
|
.OfType<Folder>()
|
|
|
|
.Where(i => i.Path != null && locationsDicionary.ContainsKey(i.Path))
|
|
|
|
.Where(i => i.Path != null && locationsDicionary.ContainsKey(i.Path))
|
|
|
|
.SelectMany(c => c.LinkedChildren).ToList();
|
|
|
|
.SelectMany(c => c.LinkedChildren).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
base.LinkedChildren = value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<BaseItem> _actualChildren;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Our children are actually just references to the ones in the physical root...
|
|
|
|
/// Our children are actually just references to the ones in the physical root...
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The actual children.</value>
|
|
|
|
/// <value>The actual children.</value>
|
|
|
|
protected override IEnumerable<BaseItem> ActualChildren
|
|
|
|
protected override IEnumerable<BaseItem> ActualChildren
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get { return _actualChildren ?? (_actualChildren = GetActualChildren()); }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<BaseItem> GetActualChildren()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Dictionary<string, string> locationsDicionary;
|
|
|
|
Dictionary<string, string> locationsDicionary;
|
|
|
|
|
|
|
|
|
|
|
@ -127,6 +133,11 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
.Where(i => i.Path != null && locationsDicionary.ContainsKey(i.Path))
|
|
|
|
.Where(i => i.Path != null && locationsDicionary.ContainsKey(i.Path))
|
|
|
|
.SelectMany(c => c.Children);
|
|
|
|
.SelectMany(c => c.Children);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void ResetDynamicChildren()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_actualChildren = null;
|
|
|
|
|
|
|
|
_linkedChildren = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|