subtr_actor/stats/calculators/
flip_reset_tuning_set.rs1use serde::{Deserialize, Serialize};
2use std::path::{Path, PathBuf};
3
4#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
5pub struct FlipResetTuningReplay {
6 pub replay_id: String,
7 pub replay_path: String,
8 pub exact_dodge_refresh_count: usize,
9 pub date: Option<String>,
10 pub title: Option<String>,
11 pub uploader: Option<String>,
12 pub player_names: Vec<String>,
13}
14
15impl FlipResetTuningReplay {
16 pub fn replay_path_from_manifest(&self, manifest_path: &Path) -> PathBuf {
17 let replay_path = Path::new(&self.replay_path);
18 if replay_path.is_absolute() {
19 replay_path.to_path_buf()
20 } else {
21 manifest_path
22 .parent()
23 .unwrap_or_else(|| Path::new("."))
24 .join(replay_path)
25 }
26 }
27}
28
29#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
30pub struct FlipResetTuningManifest {
31 pub playlist: String,
32 pub min_rank: String,
33 pub replays: Vec<FlipResetTuningReplay>,
34}