Skip to content

Commit

Permalink
feat(examples): Add Involved People List support to id3info
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus authored and polyfloyd committed Nov 22, 2024
1 parent 25a2a6c commit 22497d9
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions examples/id3info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
use id3::{
frame::{
Chapter, Comment, EncapsulatedObject, ExtendedLink, ExtendedText, Lyrics, Picture,
Popularimeter, SynchronisedLyrics, UniqueFileIdentifier,
Chapter, Comment, EncapsulatedObject, ExtendedLink, ExtendedText, InvolvedPeopleList,
InvolvedPeopleListItem, Lyrics, Picture, Popularimeter, SynchronisedLyrics,
UniqueFileIdentifier,
},
Content, Tag,
};
Expand Down Expand Up @@ -110,6 +111,19 @@ fn main() -> Result<(), Box<dyn Error>> {
.collect::<String>();
println!("{id}:{owner_identifier}=b\"{value}\"");
}
Content::InvolvedPeopleList(InvolvedPeopleList { items }) => {
if items.len() == 0 {
println!("{id}=<empty>");
} else {
for InvolvedPeopleListItem {
involvement,
involvee,
} in items
{
println!("{id}:{involvement}={involvee:?}");
}
}
}
content => {
println!("{id}={content:?}");
}
Expand Down

0 comments on commit 22497d9

Please sign in to comment.