mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Unmapped folders now get all series up front (much faster)
This commit is contained in:
parent
dbc20a3c31
commit
8a5bd31da7
@ -202,6 +202,7 @@
|
|||||||
<Compile Include="Datastore\IWriteModels.cs" />
|
<Compile Include="Datastore\IWriteModels.cs" />
|
||||||
<Compile Include="Datastore\LazyList.cs" />
|
<Compile Include="Datastore\LazyList.cs" />
|
||||||
<Compile Include="Datastore\MappingExtensions.cs" />
|
<Compile Include="Datastore\MappingExtensions.cs" />
|
||||||
|
<Compile Include="Datastore\Migration\Migration20130522.cs" />
|
||||||
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
||||||
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />
|
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />
|
||||||
<Compile Include="Datastore\Migration\Framework\MigrationOptions.cs" />
|
<Compile Include="Datastore\Migration\Framework\MigrationOptions.cs" />
|
||||||
|
@ -87,6 +87,7 @@ public virtual List<UnmappedFolder> GetUnmappedFolders(string path)
|
|||||||
throw new ArgumentException("Invalid path provided", "path");
|
throw new ArgumentException("Invalid path provided", "path");
|
||||||
|
|
||||||
var results = new List<UnmappedFolder>();
|
var results = new List<UnmappedFolder>();
|
||||||
|
var series = _seriesRepository.All();
|
||||||
|
|
||||||
if (!_diskProvider.FolderExists(path))
|
if (!_diskProvider.FolderExists(path))
|
||||||
{
|
{
|
||||||
@ -96,7 +97,7 @@ public virtual List<UnmappedFolder> GetUnmappedFolders(string path)
|
|||||||
|
|
||||||
foreach (string seriesFolder in _diskProvider.GetDirectories(path))
|
foreach (string seriesFolder in _diskProvider.GetDirectories(path))
|
||||||
{
|
{
|
||||||
if (!_seriesRepository.SeriesPathExists(seriesFolder))
|
if (!series.Any(s => s.Path == seriesFolder))
|
||||||
{
|
{
|
||||||
var di = new DirectoryInfo(seriesFolder.Normalize());
|
var di = new DirectoryInfo(seriesFolder.Normalize());
|
||||||
results.Add(new UnmappedFolder{ Name = di.Name, Path = di.FullName });
|
results.Add(new UnmappedFolder{ Name = di.Name, Path = di.FullName });
|
||||||
|
Loading…
Reference in New Issue
Block a user