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/Data/SqliteItemRepository.cs') 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 From cbb67970436e8fe073cbe28f7a2fb4217a2f2524 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Fri, 3 Apr 2020 22:41:14 +0200 Subject: Update SqliteItemRepository.cs --- Emby.Server.Implementations/Data/SqliteItemRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs') diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index e360b790c..052c4ef8c 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -5056,7 +5056,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type if (query.Limit > 0) { - commandText += "LIMIT " + query.Limit; + commandText += " LIMIT " + query.Limit; } using (var connection = GetConnection(true)) -- cgit v1.2.3 From 0b21494999f8a7e70cc137152e94c40a9b1c666b Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Fri, 3 Apr 2020 23:13:04 +0200 Subject: Update Emby.Server.Implementations/Data/SqliteItemRepository.cs Co-Authored-By: Vasily --- Emby.Server.Implementations/Data/SqliteItemRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs') diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 052c4ef8c..46c6d5520 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -5013,7 +5013,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type if (query.Limit > 0) { - commandText += "LIMIT " + query.Limit; + commandText += " LIMIT " + query.Limit; } using (var connection = GetConnection(true)) -- cgit v1.2.3