polyfloyd / rust-id3

A rust library for reading and writing ID3 metadata
MIT License
245 stars 47 forks source link

GRP1 Writing #78

Closed Marekkon5 closed 2 years ago

Marekkon5 commented 2 years ago

Hello, every time I wanna write a Text frame to GRP1 I get InvalidInput: Frame with ID GRP1 and content type Text can not be written as valid ID3. Looking into the source code (src/frame/mod.rs):

... 48
        // The matching groups must match the decoding groups of stream/frame/content.rs:decode().
        match (id.as_str(), &self.content) {
            ("GRP1", Content::Text(_)) if id.starts_with('T') => Ok(()),
            (id, Content::Text(_)) if id.starts_with('T') => Ok(()),
... 53

Which makes no sense to me. GRP1 will never start with T. Is there something I don't understand, or just a typo. Thank you.

polyfloyd commented 2 years ago

Hmm yes, that is definitely a typo. If it should be written as a Text frame the if check should not be there.

Marekkon5 commented 2 years ago

Should I make a PR?

polyfloyd commented 2 years ago

Yes! Please do :)