Remove references to pictures module

This commit is contained in:
Serial 2021-11-24 17:09:12 -05:00
parent 8b8e8eedbb
commit c0d130512b
8 changed files with 22 additions and 21 deletions

View file

@ -6,16 +6,16 @@
//! //!
//! # Supported Formats //! # Supported Formats
//! //!
//! | File Format | Extensions | Read | Write | Metadata Format(s) | //! | File Format | Extensions | Read | Write | Metadata Format(s) |
//! |-------------|-------------------------------------------------|------|-------|----------------------------------------------------| //! |-------------|-------------------------------------------------|------|-------|-----------------------------------------------|
//! | APE | `ape` |**X** |**X** |`APEv2`, `APEv1`, `ID3v2` (Not officially), `ID3v1` | //! | APE | `ape` |**X** |**X** |`APEv2`, `APEv1`, `ID3v2` (Read only), `ID3v1` |
//! | AIFF | `aiff`, `aif` |**X** |**X** |`ID3v2`, `Text Chunks` | //! | AIFF | `aiff`, `aif` |**X** |**X** |`ID3v2`, `Text Chunks` |
//! | FLAC | `flac` |**X** |**X** |`Vorbis Comments` | //! | FLAC | `flac` |**X** |**X** |`Vorbis Comments` |
//! | MP3 | `mp3` |**X** |**X** |`ID3v2`, `ID3v1`, `APEv2`, `APEv1` | //! | MP3 | `mp3` |**X** |**X** |`ID3v2`, `ID3v1`, `APEv2`, `APEv1` |
//! | MP4 | `mp4`, `m4a`, `m4b`, `m4p`, `m4r`, `m4v`, `3gp` |**X** |**X** |`Atoms` | //! | MP4 | `mp4`, `m4a`, `m4b`, `m4p`, `m4r`, `m4v`, `3gp` |**X** |**X** |`Atoms` |
//! | Opus | `opus` |**X** |**X** |`Vorbis Comments` | //! | Opus | `opus` |**X** |**X** |`Vorbis Comments` |
//! | Ogg Vorbis | `ogg` |**X** |**X** |`Vorbis Comments` | //! | Ogg Vorbis | `ogg` |**X** |**X** |`Vorbis Comments` |
//! | WAV | `wav`, `wave` |**X** |**X** |`ID3v2`, `RIFF INFO` | //! | WAV | `wav`, `wave` |**X** |**X** |`ID3v2`, `RIFF INFO` |
//! //!
//! # Examples //! # Examples
//! //!

View file

@ -1,9 +1,10 @@
pub(in crate::logic::mp4) mod read; pub(in crate::logic::mp4) mod read;
pub(in crate::logic) mod write; pub(in crate::logic) mod write;
use crate::picture::Picture;
use crate::types::item::{ItemKey, ItemValue, TagItem}; use crate::types::item::{ItemKey, ItemValue, TagItem};
use crate::types::picture::Picture;
use crate::types::tag::{Tag, TagType}; use crate::types::tag::{Tag, TagType};
use std::convert::TryInto; use std::convert::TryInto;
#[derive(Default)] #[derive(Default)]
@ -23,7 +24,7 @@ impl From<Ilst> for Tag {
AtomData::Picture(pic) => { AtomData::Picture(pic) => {
tag.pictures.push(pic); tag.pictures.push(pic);
continue; continue;
}, }
_ => continue, _ => continue,
}; };
@ -32,10 +33,10 @@ impl From<Ilst> for Tag {
&match atom.ident { &match atom.ident {
AtomIdent::Fourcc(fourcc) => { AtomIdent::Fourcc(fourcc) => {
fourcc.iter().map(|b| *b as char).collect::<String>() fourcc.iter().map(|b| *b as char).collect::<String>()
}, }
AtomIdent::Freeform { mean, name } => { AtomIdent::Freeform { mean, name } => {
format!("----:{}:{}", mean, name) format!("----:{}:{}", mean, name)
}, }
}, },
); );

View file

@ -4,7 +4,7 @@ use crate::logic::mp4::ilst::{AtomIdentRef, AtomRef};
use crate::logic::mp4::moov::Moov; use crate::logic::mp4::moov::Moov;
use crate::logic::mp4::read::nested_atom; use crate::logic::mp4::read::nested_atom;
use crate::logic::mp4::read::verify_mp4; use crate::logic::mp4::read::verify_mp4;
use crate::picture::MimeType; use crate::types::picture::MimeType;
use crate::types::picture::Picture; use crate::types::picture::Picture;
use std::fs::File; use std::fs::File;

View file

@ -3,7 +3,7 @@ use super::FlacFile;
use crate::error::{LoftyError, Result}; use crate::error::{LoftyError, Result};
use crate::logic::ogg::read::read_comments; use crate::logic::ogg::read::read_comments;
use crate::logic::ogg::tag::VorbisComments; use crate::logic::ogg::tag::VorbisComments;
use crate::picture::Picture; use crate::types::picture::Picture;
use crate::types::properties::FileProperties; use crate::types::properties::FileProperties;
use std::io::{Read, Seek, SeekFrom}; use std::io::{Read, Seek, SeekFrom};
@ -107,7 +107,7 @@ where
6 => tag 6 => tag
.pictures .pictures
.push(Picture::from_flac_bytes(&*block.content)?), .push(Picture::from_flac_bytes(&*block.content)?),
_ => {}, _ => {}
} }
} }

View file

@ -1,7 +1,7 @@
use super::tag::VorbisComments; use super::tag::VorbisComments;
use super::verify_signature; use super::verify_signature;
use crate::error::{LoftyError, Result}; use crate::error::{LoftyError, Result};
use crate::picture::Picture; use crate::types::picture::Picture;
use std::io::{Read, Seek, SeekFrom}; use std::io::{Read, Seek, SeekFrom};

View file

@ -1,5 +1,5 @@
use lofty::id3::v2::{Id3v2Version, TextEncoding}; use lofty::id3::v2::{Id3v2Version, TextEncoding};
use lofty::picture::{Picture, PictureInformation, PictureType}; use lofty::{Picture, PictureInformation, PictureType};
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;

View file

@ -1,4 +1,4 @@
use lofty::picture::{MimeType, Picture}; use lofty::{MimeType, Picture};
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;

View file

@ -1,4 +1,4 @@
use lofty::picture::PictureInformation; use lofty::PictureInformation;
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;