mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 09:44:47 +03:00
update active recordings
This commit is contained in:
@@ -27,8 +27,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public CollectionFolder()
|
||||
{
|
||||
PhysicalLocationsList = new List<string>();
|
||||
PhysicalFolderIds = new List<Guid>();
|
||||
PhysicalLocationsList = EmptyStringArray;
|
||||
PhysicalFolderIds = EmptyGuidArray;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
@@ -140,7 +140,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override IEnumerable<string> PhysicalLocations
|
||||
public override string[] PhysicalLocations
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -153,12 +153,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<string> PhysicalLocationsList { get; set; }
|
||||
public List<Guid> PhysicalFolderIds { get; set; }
|
||||
public string[] PhysicalLocationsList { get; set; }
|
||||
public Guid[] PhysicalFolderIds { get; set; }
|
||||
|
||||
protected override FileSystemMetadata[] GetFileSystemChildren(IDirectoryService directoryService)
|
||||
{
|
||||
return CreateResolveArgs(directoryService, true).FileSystemChildren.ToArray();
|
||||
return CreateResolveArgs(directoryService, true).FileSystemChildren;
|
||||
}
|
||||
|
||||
private bool _requiresRefresh;
|
||||
@@ -168,9 +168,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
if (!changed)
|
||||
{
|
||||
var locations = PhysicalLocations.ToList();
|
||||
var locations = PhysicalLocations;
|
||||
|
||||
var newLocations = CreateResolveArgs(new DirectoryService(Logger, FileSystem), false).PhysicalLocations.ToList();
|
||||
var newLocations = CreateResolveArgs(new DirectoryService(Logger, FileSystem), false).PhysicalLocations;
|
||||
|
||||
if (!locations.SequenceEqual(newLocations))
|
||||
{
|
||||
@@ -180,7 +180,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
if (!changed)
|
||||
{
|
||||
var folderIds = PhysicalFolderIds.ToList();
|
||||
var folderIds = PhysicalFolderIds;
|
||||
|
||||
var newFolderIds = GetPhysicalFolders(false).Select(i => i.Id).ToList();
|
||||
|
||||
@@ -242,15 +242,15 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
LinkedChildren = linkedChildren.ToArray(linkedChildren.Count);
|
||||
|
||||
var folderIds = PhysicalFolderIds.ToList();
|
||||
var newFolderIds = physicalFolders.Select(i => i.Id).ToList();
|
||||
var folderIds = PhysicalFolderIds;
|
||||
var newFolderIds = physicalFolders.Select(i => i.Id).ToArray();
|
||||
|
||||
if (!folderIds.SequenceEqual(newFolderIds))
|
||||
{
|
||||
changed = true;
|
||||
if (setFolders)
|
||||
{
|
||||
PhysicalFolderIds = newFolderIds.ToList();
|
||||
PhysicalFolderIds = newFolderIds;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
_requiresRefresh = _requiresRefresh || !args.PhysicalLocations.SequenceEqual(PhysicalLocations);
|
||||
if (setPhysicalLocations)
|
||||
{
|
||||
PhysicalLocationsList = args.PhysicalLocations.ToList();
|
||||
PhysicalLocationsList = args.PhysicalLocations;
|
||||
}
|
||||
|
||||
return args;
|
||||
|
||||
Reference in New Issue
Block a user