diff --git a/src/genre.rs b/src/genre.rs index 669880d..2c54cee 100644 --- a/src/genre.rs +++ b/src/genre.rs @@ -292,6 +292,7 @@ pub static GENRE_MAPPINGS: LazyLock> = LazyL ("POP 1", "Pop"), ("POP 80s SYNTH", "Pop 80s"), ("POP 80s", "Pop 80s"), + ("POP 90s EURODANCE", "House Eurodance"), ("POP 90s", "Pop 90s"), ("POP CHILL 1", "Pop"), ("POP CHILL HITAAT", "Pop"), @@ -327,7 +328,7 @@ static REGEX_SUBSTITUTES: LazyLock<[(Regex, &'static str); 5]> = LazyLock::new(| // Replace various opening bracket types with "(" (Regex::new(r"[\[{]+").unwrap(), "("), // Replace various closing bracket types with ")" - (Regex::new(r"[\]}]+").unwrap(), ")"), + (Regex::new(r"[]}]+").unwrap(), ")"), // Collapse multiple consecutive opening parentheses into one (Regex::new(r"\(\s*\){2,}").unwrap(), "("), // Collapse multiple consecutive closing parentheses into one diff --git a/src/state.rs b/src/state.rs index 5696b26..baa18b4 100644 --- a/src/state.rs +++ b/src/state.rs @@ -91,13 +91,10 @@ impl State { fn read_state() -> DashMap { Self::get_state_path().map_or_else(DashMap::new, |file_path| match fs::read_to_string(file_path) { - Ok(contents) => match serde_json::from_str(&contents) { - Ok(map) => map, - Err(err) => { - eprintln!("Failed to parse state file: {err}"); - DashMap::new() - } - }, + Ok(contents) => serde_json::from_str(&contents).unwrap_or_else(|err| { + eprintln!("Failed to parse state file: {err}"); + DashMap::new() + }), Err(err) => { eprintln!("Failed to read state file: {err}"); DashMap::new() diff --git a/src/track_renamer.rs b/src/track_renamer.rs index ab8465e..c36ba08 100644 --- a/src/track_renamer.rs +++ b/src/track_renamer.rs @@ -429,7 +429,7 @@ impl TrackRenamer { } /// Insert processed tracks and save state. - fn update_state(&self) -> anyhow::Result<()> { + fn update_state(&self) -> Result<()> { let (added_count, updated_count) = self .tracks .par_iter()