public DownloadHistoryViewModel( BeatmapDownloaderDatabaseContext db, IOptions <BeatmapDownloaderConfiguration> config) { Db = db; RecentDownloaded = Db .DownloadedBeatmapSets .OrderByDescending(d => d.Id) .ToList(); this.Source = config.Value.DownloadProvider.Name; }
public BeatmapDownloadService(ILifetimeScope scope, ILogger <BeatmapDownloadService> logger, BeatmapDownloaderDatabaseContext downloadDb, OsuDatabaseContext osuDb, IEventBus eventBus, IReadOnlyPluginOptions <BeatmapDownloaderConfiguration> options) { Scope = scope; Logger = logger; DownloadDb = downloadDb; OsuDb = osuDb; OptionFactory = options; EventBus = eventBus; }