From 3161e85f7678aab603eb2f0180a2b911207e477e Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 3 Apr 2020 17:30:01 +0200 Subject: Address comments --- Emby.Server.Implementations/Data/SqliteItemRepository.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Emby.Server.Implementations') diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index e3242f7b4..e360b790c 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -5011,6 +5011,11 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type commandText += " order by ListOrder"; + if (query.Limit > 0) + { + commandText += "LIMIT " + query.Limit; + } + using (var connection = GetConnection(true)) { var list = new List(); @@ -5049,6 +5054,11 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type commandText += " order by ListOrder"; + if (query.Limit > 0) + { + commandText += "LIMIT " + query.Limit; + } + using (var connection = GetConnection(true)) { var list = new List(); -- cgit v1.2.3