Skip to content

Commit

Permalink
fix(frame): Fix validation for all "Involved People List" frames
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Nov 19, 2024
1 parent 54bdd1f commit 2a95bb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ impl Frame {
// The matching groups must match the decoding groups of stream/frame/content.rs:decode().
match (id.as_str(), &self.content) {
("GRP1", Content::Text(_)) => Ok(()),
(id, Content::Text(_)) if id.starts_with('T') => Ok(()),
(id, Content::Text(_)) if id.starts_with('T') && !matches!(id, "TIPL" | "TMCL") => {
Ok(())
}
("TXXX", Content::ExtendedText(_)) => Ok(()),
(id, Content::Link(_)) if id.starts_with('W') => Ok(()),
("WXXX", Content::ExtendedLink(_)) => Ok(()),
Expand All @@ -84,7 +86,7 @@ impl Frame {
("APIC", Content::Picture(_)) => Ok(()),
("CHAP", Content::Chapter(_)) => Ok(()),
("MLLT", Content::MpegLocationLookupTable(_)) => Ok(()),
("IPLS", Content::InvolvedPeopleList(_)) => Ok(()),
("IPLS" | "TIPL" | "TMCL", Content::InvolvedPeopleList(_)) => Ok(()),
("PRIV", Content::Private(_)) => Ok(()),
("CTOC", Content::TableOfContents(_)) => Ok(()),
("UFID", Content::UniqueFileIdentifier(_)) => Ok(()),
Expand Down

0 comments on commit 2a95bb6

Please sign in to comment.