Reduce one query

Signed-off-by: Petrus.Z <silencly07@gmail.com>
pull/6850/head
Petrus.Z 3 years ago
parent 6565b0cfbe
commit 263bbf897a
No known key found for this signature in database
GPG Key ID: 71B321E14F898C3D

@ -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;
} }
} }

Loading…
Cancel
Save