Update to 3.5.2 and .net core 2.1

This commit is contained in:
stefan
2018-09-12 19:26:21 +02:00
parent c32d865638
commit 48facb797e
1419 changed files with 27525 additions and 88927 deletions

View File

@@ -6,7 +6,6 @@ using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Querying;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Emby.Server.Implementations.Activity
{
@@ -27,7 +26,6 @@ namespace Emby.Server.Implementations.Activity
public void Create(ActivityLogEntry entry)
{
entry.Id = Guid.NewGuid().ToString("N");
entry.Date = DateTime.UtcNow;
_repo.Create(entry);
@@ -35,11 +33,11 @@ namespace Emby.Server.Implementations.Activity
EventHelper.FireEventIfNotNull(EntryCreated, this, new GenericEventArgs<ActivityLogEntry>(entry), _logger);
}
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit)
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, bool? hasUserId, int? startIndex, int? limit)
{
var result = _repo.GetActivityLogEntries(minDate, startIndex, limit);
var result = _repo.GetActivityLogEntries(minDate, hasUserId, startIndex, limit);
foreach (var item in result.Items.Where(i => !string.IsNullOrWhiteSpace(i.UserId)))
foreach (var item in result.Items.Where(i => !i.UserId.Equals(Guid.Empty)))
{
var user = _userManager.GetUserById(item.UserId);
@@ -52,5 +50,10 @@ namespace Emby.Server.Implementations.Activity
return result;
}
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit)
{
return GetActivityLogEntries(minDate, null, startIndex, limit);
}
}
}