From aa2c96ec7de2fe35549f7cda60562b43789e0182 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 15 Sep 2013 17:48:39 -0700 Subject: [PATCH] use Id instead of time to sort logs to take advantage of built in index. --- NzbDrone.Api/Logs/LogModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NzbDrone.Api/Logs/LogModule.cs b/NzbDrone.Api/Logs/LogModule.cs index e1c39d92b..59ea4975d 100644 --- a/NzbDrone.Api/Logs/LogModule.cs +++ b/NzbDrone.Api/Logs/LogModule.cs @@ -17,6 +17,12 @@ namespace NzbDrone.Api.Logs private PagingResource GetLogs(PagingResource pagingResource) { var pageSpec = pagingResource.InjectTo>(); + + if (pageSpec.SortKey == "time") + { + pageSpec.SortKey = "id"; + } + return ApplyToPage(_logService.Paged, pageSpec); } }