diff --git a/src/NzbDrone.Core/History/HistoryRepository.cs b/src/NzbDrone.Core/History/HistoryRepository.cs index 1471d30f2..c61effdbd 100644 --- a/src/NzbDrone.Core/History/HistoryRepository.cs +++ b/src/NzbDrone.Core/History/HistoryRepository.cs @@ -100,11 +100,13 @@ namespace NzbDrone.Core.History public int CountSince(int indexerId, DateTime date, List eventTypes) { + var intEvents = eventTypes.Select(t => (int)t).ToList(); + var builder = new SqlBuilder(_database.DatabaseType) .SelectCount() .Where(x => x.IndexerId == indexerId) .Where(x => x.Date >= date) - .Where(x => eventTypes.Contains(x.EventType)); + .Where(x => intEvents.Contains((int)x.EventType)); var sql = builder.AddPageCountTemplate(typeof(History));