aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Activity/ActivityRepository.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-08-09 15:59:26 -0400
committerGitHub <noreply@github.com>2017-08-09 15:59:26 -0400
commitc2996935c8a873662e6d301f139c88df8a542ed2 (patch)
treecf405f91e893fe6a3fc20dfa1622f027666d4848 /Emby.Server.Implementations/Activity/ActivityRepository.cs
parentab834f8fdffb64b562ece0512a53f361c62f7f6f (diff)
parent7a74c705e584774534b74e11c1ab86144cb454c6 (diff)
Merge pull request #2800 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Activity/ActivityRepository.cs')
-rw-r--r--Emby.Server.Implementations/Activity/ActivityRepository.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityRepository.cs b/Emby.Server.Implementations/Activity/ActivityRepository.cs
index e9b6f7a40..7720f8f2f 100644
--- a/Emby.Server.Implementations/Activity/ActivityRepository.cs
+++ b/Emby.Server.Implementations/Activity/ActivityRepository.cs
@@ -10,6 +10,7 @@ using MediaBrowser.Model.Activity;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Querying;
using SQLitePCL.pretty;
+using MediaBrowser.Model.Extensions;
namespace Emby.Server.Implementations.Activity
{
@@ -94,13 +95,13 @@ namespace Emby.Server.Implementations.Activity
var whereTextWithoutPaging = whereClauses.Count == 0 ?
string.Empty :
- " where " + string.Join(" AND ", whereClauses.ToArray());
+ " where " + string.Join(" AND ", whereClauses.ToArray(whereClauses.Count));
if (startIndex.HasValue && startIndex.Value > 0)
{
var pagingWhereText = whereClauses.Count == 0 ?
string.Empty :
- " where " + string.Join(" AND ", whereClauses.ToArray());
+ " where " + string.Join(" AND ", whereClauses.ToArray(whereClauses.Count));
whereClauses.Add(string.Format("Id NOT IN (SELECT Id FROM ActivityLogEntries {0} ORDER BY DateCreated DESC LIMIT {1})",
pagingWhereText,
@@ -109,7 +110,7 @@ namespace Emby.Server.Implementations.Activity
var whereText = whereClauses.Count == 0 ?
string.Empty :
- " where " + string.Join(" AND ", whereClauses.ToArray());
+ " where " + string.Join(" AND ", whereClauses.ToArray(whereClauses.Count));
commandText += whereText;
@@ -154,7 +155,7 @@ namespace Emby.Server.Implementations.Activity
result.TotalRecordCount = statement.ExecuteQuery().SelectScalarInt().First();
}
- result.Items = list.ToArray();
+ result.Items = list.ToArray(list.Count);
return result;
}, ReadTransactionMode);