diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bd8687c..6b773b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Error**: `ErrorKind::SizeMismatch` ### Changed -- **ID3v2**: Frame/tag flags with optional additional data are now `Option` instead of `(bool, T)` +- **ID3v2**: + - Frame/tag flags with optional additional data are now `Option` instead of `(bool, T)` + - `id3::v2::TextEncoding` is now exported as `lofty::TextEncoding` - `read_from{_path}` will no longer take a `bool` for reading properties, and will do it by default. To change this behavior, you must now use `Probe`. - **FileType**: `primary_tag_type` will no longer change its return depending on the enabled features. diff --git a/src/id3/v2/mod.rs b/src/id3/v2/mod.rs index e9113517..dc703622 100644 --- a/src/id3/v2/mod.rs +++ b/src/id3/v2/mod.rs @@ -21,8 +21,6 @@ use byteorder::{BigEndian, ByteOrder, ReadBytesExt}; cfg_if::cfg_if! { if #[cfg(feature = "id3v2")] { pub use flags::ID3v2TagFlags; - // TODO: remove - pub use crate::util::text::TextEncoding; pub use util::upgrade::{upgrade_v2, upgrade_v3}; pub(crate) mod tag; diff --git a/src/id3/v2/restrictions.rs b/src/id3/v2/restrictions.rs index 6096247b..f456f92a 100644 --- a/src/id3/v2/restrictions.rs +++ b/src/id3/v2/restrictions.rs @@ -66,7 +66,7 @@ pub struct TagRestrictions { /// Text encoding restrictions /// /// `false` - No restrictions - /// `true` - Strings are only encoded with [`TextEncoding::Latin1`](crate::id3::v2::TextEncoding::Latin1) or [`TextEncoding::UTF8`](crate::id3::v2::TextEncoding::UTF8) + /// `true` - Strings are only encoded with [`TextEncoding::Latin1`](crate::TextEncoding::Latin1) or [`TextEncoding::UTF8`](crate::TextEncoding::UTF8) pub text_encoding: bool, /// Restrictions on all text field sizes. See [`TextSizeRestrictions`] pub text_fields_size: TextSizeRestrictions, diff --git a/src/lib.rs b/src/lib.rs index 9859f904..3f381a56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -193,6 +193,7 @@ pub use crate::picture::{MimeType, Picture, PictureType}; pub use crate::properties::FileProperties; pub use crate::tag::{Tag, TagType}; pub use tag::item::{ItemKey, ItemValue, TagItem}; +pub use util::text::TextEncoding; pub use crate::traits::{Accessor, TagExt}; diff --git a/tests/picture/format_parsers.rs b/tests/picture/format_parsers.rs index fca6ec51..f35b44e4 100644 --- a/tests/picture/format_parsers.rs +++ b/tests/picture/format_parsers.rs @@ -1,5 +1,5 @@ -use lofty::id3::v2::{ID3v2Version, TextEncoding}; -use lofty::{Picture, PictureInformation, PictureType}; +use lofty::id3::v2::ID3v2Version; +use lofty::{Picture, PictureInformation, PictureType, TextEncoding}; use std::fs::File; use std::io::Read; diff --git a/tests/tags/conversions.rs b/tests/tags/conversions.rs index 9c48a77a..18e3b9c3 100644 --- a/tests/tags/conversions.rs +++ b/tests/tags/conversions.rs @@ -1,7 +1,7 @@ // Tests for special case conversions -use lofty::id3::v2::{Frame, FrameFlags, FrameValue, ID3v2Tag, LanguageFrame, TextEncoding}; -use lofty::{ItemKey, Tag, TagType}; +use lofty::id3::v2::{Frame, FrameFlags, FrameValue, ID3v2Tag, LanguageFrame}; +use lofty::{ItemKey, Tag, TagType, TextEncoding}; #[test] fn tag_to_id3v2_lang_frame() {