public void Init() { string[] keys = File.ReadAllLines("Resources/keys.dat"); api = new OsuApi("2558", keys[0], keys[1]); replays = new ServerReplayDb(api, "serverdata"); beatmaps = new ServerBeatmapDb(api, "serverdata"); }
public void Init() { string[] keys = File.ReadAllLines("Resources/keys.dat"); client = new HttpClient(); Logger.Instance = new TestLogger(); api = new OsuApi(client, "2558", keys[0], keys[1]); replays = new ServerReplayDb(api, Path.Combine(root, "serverdata")); beatmaps = new ServerBeatmapDb(api, Path.Combine(root, "serverdata"), true); }
public ServerBeatmapDb(OsuApi api, string serverDir) { this.api = api; folder = serverDir; string db = Path.Combine(serverDir, "beatmaps.db"); if (File.Exists(db)) { hashes = JsonConvert.DeserializeObject <Dictionary <string, string> >(File.ReadAllText(db)); } else { hashes = new Dictionary <string, string>(); } }
public ServerReplayDb(OsuApi api, string serverFolder) { this.api = api; this.serverFolder = serverFolder; }