예제 #1
0
        public DownloadHistoryViewModel(
            BeatmapDownloaderDatabaseContext db,
            IOptions <BeatmapDownloaderConfiguration> config)
        {
            Db = db;
            RecentDownloaded = Db
                               .DownloadedBeatmapSets
                               .OrderByDescending(d => d.Id)
                               .ToList();

            this.Source = config.Value.DownloadProvider.Name;
        }
예제 #2
0
 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;
 }