Having Trouble Reading Unsupported Tag #408
-
|
Hello! I am trying to read this tag in particular https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#artists but it looks like it isn't supported. So what I'm trying to do is the following: let artists_tag: &str = match tag.tag_type() {
TagType::Ape => "Artists",
TagType::Id3v2 => "TXXX:ARTISTS", // i also tried TXXX:Artists
TagType::Mp4Ilst => "----:com.apple.iTunes:ARTISTS",
TagType::VorbisComments => "ARTISTS",
_ => "artists",
};
let artists = tag.get_string(&ItemKey::from_key(tag.tag_type(), artists_tag)).unwrap_or_default();but it always comes back as empty. Is there a different way to go about this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello!
In the case of Really, the best solution is for an |
Beta Was this translation helpful? Give feedback.
Hello!
Tagdoesn't retain format-specific keys, so theItemKeycreated with"----:com.apple.iTunes:ARTISTS"for example will never return anything.In the case of
TagType::{Id3v2, VorbisComments, Ape}, we are able to convert the items toItemKey::Unknown. So you can dotag.get_string(&ItemKey::Unknown(String::from("ARTISTS")))for those formats and it will read and write properly.Really, the best solution is for an
ItemKey::Artiststo be added, as I want to eventually phase outItemKey::Unknown. I'll get that in for 0.21.0.