Reduce one query

Signed-off-by: Petrus.Z <silencly07@gmail.com>
This commit is contained in:
Petrus.Z
2021-11-18 15:34:35 +08:00
parent 6565b0cfbe
commit 263bbf897a

View File

@@ -79,12 +79,6 @@ namespace Emby.Server.Implementations.Library.Validators
Limit = pagesize, Limit = pagesize,
Recursive = true Recursive = true
}); });
startIndex += pagesize;
if (!movies.Any())
{
break;
}
foreach (var m in movies) foreach (var m in movies)
{ {
@@ -100,6 +94,13 @@ namespace Emby.Server.Implementations.Library.Validators
} }
} }
} }
if (movies.Count < pagesize)
{
break;
}
startIndex += pagesize;
} }
} }