From 0b92d4a033cb7ad5b925ea86c13ee94b705268b2 Mon Sep 17 00:00:00 2001 From: Jakub Trzeciak Date: Thu, 15 Feb 2024 22:50:15 +0100 Subject: fix stupid bug inner_tag used max_track as a title --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0dc65bc..766dbfa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,7 +53,7 @@ impl InnerTag { [artist, title] => Ok(Self::from_parts(title.to_string(), Some(artist.to_string()), None, None)), [artist, album, title] => Ok(Self::from_parts(title.to_string(), Some(artist.to_string()), Some(album.to_string()), None)), [artist, album, track_str, title] => track_str.parse::().map_or(err, |track| Ok(Self::from_parts(title.to_string(), Some(artist.to_string()), Some(album.to_string()), Some(track)))), - [artist, album, track_str, title, _] => track_str.parse::().map_or(err, |track| Ok(Self::from_parts(title.to_string(), Some(artist.to_string()), Some(album.to_string()), Some(track)))), + [artist, album, track_str, _, title] => track_str.parse::().map_or(err, |track| Ok(Self::from_parts(title.to_string(), Some(artist.to_string()), Some(album.to_string()), Some(track)))), _ => err, } } -- cgit v1.2.3