Example #1
0
        public override void Execute()
        {
            var currentRuleset  = LegacyHelper.GetRulesetFromLegacyID(0);
            var allowedUsers    = new List <string>();
            var songsFolderPath = OsuPathUtils.GetSongsFolderPath();

            if (ExtraUsernames != null)
            {
                allowedUsers.AddRange(ExtraUsernames);
            }

            OsuDb    osuDb    = OsuDb.Read(OsuPathUtils.GetOsuDbPath());
            ScoresDb scoresDb = ScoresDb.Read(OsuPathUtils.GetOsuScoresDbPath());

            Dictionary <string, string> checkSumToOsuFile = new Dictionary <string, string>();

            foreach (var beatmap in osuDb.Beatmaps.Where(beatmap => beatmap.BeatmapChecksum != null && beatmap.RankedStatus == SubmissionStatus.Ranked))
            {
                if (!checkSumToOsuFile.TryAdd(beatmap.BeatmapChecksum, songsFolderPath + "/" + beatmap.FolderName + "/" + beatmap.BeatmapFileName))
                {
                    Console.WriteLine("WARNING: beatmap " + beatmap.BeatmapFileName + " found multiple times in osu db");
                }
            }

            string[] keys         = scoresDb.Beatmaps.Keys.ToArray();
            var      allScoresBag = new ConcurrentBag <LocalReplayInfo>();

            string[] keysToProcess = TestRun ? keys[..20] : keys;
Example #2
0
 public MainWindow()
 {
     AvailableMods = Ruleset.GetAllMods().ToList();
     osu_path      = OsuPathUtils.GetOsuPath();
     osu_database  = OsuDb.Read(OsuPathUtils.GetOsuDbPath());
     InitializeComponent();
     std_beatmaps = osu_database.Beatmaps.Where(o => culture.CompareInfo.IndexOf(o.GameMode.ToString(), "Standard", CompareOptions.IgnoreCase) >= 0);
     AddBeatmapsToUI("");
 }