musikr: make id3v2 naming consistent
This commit is contained in:
parent
f7d61cd1dc
commit
59f66978ff
4 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@ use super::mpeg::MPEGFile;
|
|||
use super::ogg::OpusFile;
|
||||
use super::ogg::VorbisFile;
|
||||
use super::flac::FLACFile;
|
||||
use super::id3::Tag;
|
||||
use super::id3v2::ID3v2Tag;
|
||||
|
||||
pub struct File<'file_ref> {
|
||||
this: Pin<&'file_ref mut CPPFile>
|
||||
|
|
|
@ -5,11 +5,11 @@ use super::bridge::{
|
|||
use super::tk::{ByteVector, StringList};
|
||||
use std::pin::Pin;
|
||||
|
||||
pub struct Tag<'file_ref> {
|
||||
pub struct ID3v2Tag<'file_ref> {
|
||||
this: Pin<&'file_ref CPPID3v2Tag>
|
||||
}
|
||||
|
||||
impl<'file_ref> Tag<'file_ref> {
|
||||
impl<'file_ref> ID3v2Tag<'file_ref> {
|
||||
pub(super) fn new(this: Pin<&'file_ref CPPID3v2Tag>) -> Self {
|
||||
Self { this }
|
||||
}
|
|
@ -9,4 +9,4 @@ pub mod flac;
|
|||
pub mod xiph;
|
||||
pub mod mpeg;
|
||||
pub mod tk;
|
||||
pub mod id3;
|
||||
pub mod id3v2;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::pin::Pin;
|
||||
use super::bridge::{self, CPPMPEGFile};
|
||||
use super::id3::Tag;
|
||||
use super::id3v2::ID3v2Tag;
|
||||
|
||||
pub struct MPEGFile<'file_ref> {
|
||||
this: Pin<&'file_ref mut CPPMPEGFile>
|
||||
|
@ -11,10 +11,10 @@ impl<'file_ref> MPEGFile<'file_ref> {
|
|||
Self { this }
|
||||
}
|
||||
|
||||
pub fn id3v2_tag(&mut self) -> Option<Tag<'file_ref>> {
|
||||
pub fn id3v2_tag(&mut self) -> Option<ID3v2Tag<'file_ref>> {
|
||||
let tag = self.this.as_mut().ID3v2Tag(false);
|
||||
let tag_ref = unsafe { tag.as_ref() };
|
||||
let tag_pin = tag_ref.map(|tag| unsafe { Pin::new_unchecked(tag) });
|
||||
tag_pin.map(|tag| Tag::new(tag))
|
||||
tag_pin.map(|tag| ID3v2Tag::new(tag))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue