|
|
@ -1,7 +1,6 @@
|
|
|
|
using MediaBrowser.Common.Progress;
|
|
|
|
using MediaBrowser.Common.Progress;
|
|
|
|
using MediaBrowser.Controller.Entities.TV;
|
|
|
|
using MediaBrowser.Controller.Entities.TV;
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
using MediaBrowser.Controller.Localization;
|
|
|
|
|
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
@ -14,7 +13,6 @@ using System.Linq;
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using MediaBrowser.Model.Users;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -50,7 +48,7 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
[IgnoreDataMember]
|
|
|
|
[IgnoreDataMember]
|
|
|
|
public virtual bool IsPreSorted
|
|
|
|
public virtual bool IsPreSorted
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return false; }
|
|
|
|
get { return ConfigurationManager.Configuration.EnableWindowsShortcuts; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -122,7 +120,7 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
[IgnoreDataMember]
|
|
|
|
[IgnoreDataMember]
|
|
|
|
protected virtual bool SupportsShortcutChildren
|
|
|
|
protected virtual bool SupportsShortcutChildren
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return true; }
|
|
|
|
get { return false; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -1070,7 +1068,7 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var changesFound = false;
|
|
|
|
var changesFound = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (SupportsShortcutChildren && LocationType == LocationType.FileSystem)
|
|
|
|
if (LocationType == LocationType.FileSystem)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (RefreshLinkedChildren(fileSystemChildren))
|
|
|
|
if (RefreshLinkedChildren(fileSystemChildren))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1092,7 +1090,11 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
var currentManualLinks = LinkedChildren.Where(i => i.Type == LinkedChildType.Manual).ToList();
|
|
|
|
var currentManualLinks = LinkedChildren.Where(i => i.Type == LinkedChildType.Manual).ToList();
|
|
|
|
var currentShortcutLinks = LinkedChildren.Where(i => i.Type == LinkedChildType.Shortcut).ToList();
|
|
|
|
var currentShortcutLinks = LinkedChildren.Where(i => i.Type == LinkedChildType.Shortcut).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
var newShortcutLinks = fileSystemChildren
|
|
|
|
List<LinkedChild> newShortcutLinks;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (SupportsShortcutChildren)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
newShortcutLinks = fileSystemChildren
|
|
|
|
.Where(i => (i.Attributes & FileAttributes.Directory) != FileAttributes.Directory && FileSystem.IsShortcut(i.FullName))
|
|
|
|
.Where(i => (i.Attributes & FileAttributes.Directory) != FileAttributes.Directory && FileSystem.IsShortcut(i.FullName))
|
|
|
|
.Select(i =>
|
|
|
|
.Select(i =>
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1123,6 +1125,8 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.Where(i => i != null)
|
|
|
|
.Where(i => i != null)
|
|
|
|
.ToList();
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else { newShortcutLinks = new List<LinkedChild>(); }
|
|
|
|
|
|
|
|
|
|
|
|
if (!newShortcutLinks.SequenceEqual(currentShortcutLinks, new LinkedChildComparer()))
|
|
|
|
if (!newShortcutLinks.SequenceEqual(currentShortcutLinks, new LinkedChildComparer()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|