New: Artist History Modal in Artist Details Page

This commit is contained in:
Qstick
2017-12-13 22:38:27 -05:00
parent 0981260887
commit 7e4a8c8ff7
17 changed files with 659 additions and 96 deletions
+14 -1
View File
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Marr.Data.QGen;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore;
@@ -13,7 +14,7 @@ using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Profiles.Languages;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Music;
using NzbDrone.Core.Music.Events;
namespace NzbDrone.Core.History
@@ -24,6 +25,8 @@ namespace NzbDrone.Core.History
History MostRecentForAlbum(int episodeId);
History MostRecentForDownloadId(string downloadId);
History Get(int historyId);
List<History> GetByArtist(int artistId, HistoryEventType? eventType);
List<History> GetByAlbum(int artistId, int albumId, HistoryEventType? eventType);
List<History> Find(string downloadId, HistoryEventType eventType);
List<History> FindByDownloadId(string downloadId);
List<History> Since(DateTime date, HistoryEventType? eventType);
@@ -66,6 +69,16 @@ namespace NzbDrone.Core.History
return _historyRepository.Get(historyId);
}
public List<History> GetByArtist(int artistId, HistoryEventType? eventType)
{
return _historyRepository.GetByArtist(artistId, eventType);
}
public List<History> GetByAlbum(int artistId, int albumId, HistoryEventType? eventType)
{
return _historyRepository.GetByAlbum(artistId, albumId, eventType);
}
public List<History> Find(string downloadId, HistoryEventType eventType)
{
return _historyRepository.FindByDownloadId(downloadId).Where(c => c.EventType == eventType).ToList();