8 releases (5 breaking)

0.6.0 Feb 4, 2025
0.5.0 Jan 11, 2023
0.4.0 Jan 13, 2022
0.3.0 Mar 29, 2020
0.1.1 Jan 21, 2016

#69 in Audio

Download history 7/week @ 2024-10-27 1/week @ 2024-11-03 12/week @ 2024-11-17 6/week @ 2024-11-24 6/week @ 2024-12-01 7/week @ 2024-12-08 14/week @ 2024-12-15 2/week @ 2025-01-05 6/week @ 2025-01-12 7/week @ 2025-01-19 59/week @ 2025-01-26 329/week @ 2025-02-02 42/week @ 2025-02-09

438 downloads per month

MIT license

42KB
812 lines

APE

A library for reading and writing APEv2 tags.

CI Status Downloads Documentation

Changelog

0.6.0 (04.02.2025)

Fixed multiple values support. You may need to overwrite your tags if you have called the Tag::add_item method with the same key multiple times, since the spec states that "Every Tag Item Key can only occures (at most) once".

  • Updated byteorder to 1.5.
  • Added TryFrom<&Item> trait implementation for Vec<&str> and &str.
  • Added TryFrom<Item> trait implementation for Vec<String> and String.
  • Removed ItemValue enum and Item.value field; use TryFrom instead.
  • Added ItemType { Binary, Locator, Text } enum.
  • Added Item::new(key, type, value) method.
  • Removed Item::from_binary, Item::from_locator and Item::from_text methods; use Item::new method instead.
  • Added Item.add_value method.
  • Removed Tag::add_item method; use Item.add_value instead.
  • Added Item::with_type method.
  • Added Item::with_value method.
  • Added Item.get_type method.
  • Changed Error enum:
    • Removed: FromUtf8, ParseInt
    • Added: ParseItemKey, ParseItemBinary, ParseItemValue, ParseLyrics3V2SizeStr, ParseLyrics3V2SizeInt.
    • Changed:
      • BadItemType -> InvalidItemType(u32).
      • BadTagSize -> InvalidTagSize.

0.5.0 (11.01.2023)

  • Added support for multiple values under same key:
    • Added Tag::items method.
    • Added Tag::add_item method.
    • Replaced Tag::remove_item by Tag::remove_items method. Tag::item method returns a first found item. Tag::set_item removes all items under the given key and adds a new one.
  • Added derive Clone for Item and ItemValue structs.

0.4.0 (13.01.2022)

  • Switched to 2021 edition.
  • Updated byteorder to 1.4
  • Support reading/writing/removing tags from opened files.
  • Case-insensitive key comparison.
  • Support writing an empty tag.

0.3.0 (29.03.2020)

  • Switched to 2018 edition.
  • Updated byteorder to 1.3
  • Fixed type parameters in Item::from_locator and Item::from_text.
  • Removed use of deprecated Error::description.
  • Lowercase error description.
  • Item::to_vec method is private now.
  • Removed items field from the Tag struct.
  • Added Tag::iter() method.
  • Added IntoIterator implementation for Tag struct.
  • Tag::write method replaced by write function.

0.2.0 (10.12.2017)

  • Use byteorder 1.0.0.

0.1.2 (18.05.2016)

  • Small internal improvements.

0.1.1 (21.01.2016)

  • Use Result<()> instead of Option<Error>.

0.1.0 (16.01.2016)

  • First release.

LICENSE

The MIT License (MIT)

Dependencies

~115KB