summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJakub Trzeciak <jp3@jptrzy.xyz>2024-02-15 22:50:15 +0100
committerJakub Trzeciak <jp3@jptrzy.xyz>2024-02-15 22:50:15 +0100
commit0b92d4a033cb7ad5b925ea86c13ee94b705268b2 (patch)
tree060e180da11e5bb8e6c154203b29680a6e59df22 /src/main.rs
parent988945ca8917b9ddbc5f2101f6ca49342a7c2661 (diff)
downloadogg-tagger-0b92d4a033cb7ad5b925ea86c13ee94b705268b2.tar.gz
ogg-tagger-0b92d4a033cb7ad5b925ea86c13ee94b705268b2.tar.bz2
ogg-tagger-0b92d4a033cb7ad5b925ea86c13ee94b705268b2.zip
fix stupid bugHEADmaster
inner_tag used max_track as a title
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
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::<u32>().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::<u32>().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::<u32>().map_or(err, |track| Ok(Self::from_parts(title.to_string(), Some(artist.to_string()), Some(album.to_string()), Some(track)))),
_ => err,
}
}
Software created with 💖