lofty-rs icon indicating copy to clipboard operation
lofty-rs copied to clipboard

ID3v2: populate popularimeter tag from frame value (#63)

Open maneac opened this issue 3 years ago • 2 comments

Use the rating field as the value of the Popularimeter tags when handling ID3v2 tags.

maneac avatar Aug 20 '22 12:08 maneac

Thanks! It might be better to use Popularimeter::as_bytes and store it as ItemValue::Binary to preserve the other fields, just in case they're written.

Could you also document the behavior here? 🙂

Serial-ATA avatar Aug 20 '22 14:08 Serial-ATA

Hey, I've updated the PR to now use the binary encoding to preserve all fields of the tag. This highlighted further issues when converting between the formats, which should now also be resolved.

Documentation has been updated as suggested. I believe the existing documentation elsewhere already covers the expected behaviour, but I'm happy to update further if needed :slightly_smiling_face:

maneac avatar Aug 21 '22 12:08 maneac

Hey @maneac, I just went ahead and made the changes to make sure this gets in 0.9.0. Thanks for your work on this! :)

Serial-ATA avatar Oct 14 '22 13:10 Serial-ATA