mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 06:02:32 +00:00
Add example of reading album artist to tag reader (#65)
This commit is contained in:
parent
80f29cafef
commit
b407ab140c
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,13 @@ fn main() {
|
||||||
println!("Album: {}", tag.album().unwrap_or("None"));
|
println!("Album: {}", tag.album().unwrap_or("None"));
|
||||||
println!("Genre: {}", tag.genre().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 properties = tagged_file.properties();
|
||||||
|
|
||||||
let duration = properties.duration();
|
let duration = properties.duration();
|
||||||
|
|
Loading…
Reference in a new issue