Add example of reading album artist to tag reader (#65)

This commit is contained in:
Colin Diesh 2022-08-31 22:26:06 -06:00 committed by GitHub
parent 80f29cafef
commit b407ab140c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,13 @@ fn main() {
println!("Album: {}", tag.album().unwrap_or("None"));
println!("Genre: {}", tag.genre().unwrap_or("None"));
// import keys from https://docs.rs/lofty/latest/lofty/enum.ItemKey.html
println!(
"Album Artist: {}",
tag.get_string(&lofty::ItemKey::AlbumArtist)
.unwrap_or("None")
);
let properties = tagged_file.properties();
let duration = properties.duration();