audiotags
audiotags copied to clipboard
AudioTag::year() not always valid when it should be
Hi,
I'm new to Rust and started working on a program which iterates through the id3 tags of my iTunes purchased music.
I checked iTunes for the Year tag, which is valid, but the AudioTag
value is None
. Here's a small example:
use std::path::Path;
let path = Path::new("03 How to Save a Life (New Version).m4a")
let tag = Tag::default().read_from_path(path);
let year = tag.year().unwrap_or(0);
println("Year {}", year)
-- Output
Year: 0
I don't have my code up on GitHub yet, although if you need anything further from me, please let me know.
We merged audiotags2 to audiotags with lots of updates so if you use the 0.4 version what result would you get ?
For tag try this:
let mut tag = Tag::new().read_from_path(MP3_FILE).expect("Could not open the file");