mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 06:02:32 +00:00
EBML: Retain companion tag
This commit is contained in:
parent
13c5ff9938
commit
f13a9c5128
1 changed files with 9 additions and 2 deletions
|
@ -13,10 +13,11 @@ pub use tag::*;
|
|||
pub use tag_name::*;
|
||||
pub use target::*;
|
||||
|
||||
use crate::config::WriteOptions;
|
||||
use crate::config::{global_options, WriteOptions};
|
||||
use crate::error::LoftyError;
|
||||
use crate::io::{FileLike, Length, Truncate};
|
||||
use crate::picture::Picture;
|
||||
use crate::tag::companion_tag::CompanionTag;
|
||||
use crate::tag::{Accessor, MergeTag, SplitTag, TagExt, TagType};
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
@ -373,7 +374,13 @@ impl MergeTag for SplitTagRemainder {
|
|||
|
||||
impl From<MatroskaTag> for crate::tag::Tag {
|
||||
fn from(input: MatroskaTag) -> Self {
|
||||
input.split_tag().1
|
||||
let (remainder, mut tag) = input.split_tag();
|
||||
|
||||
if unsafe { global_options().preserve_format_specific_items } && remainder.0.len() > 0 {
|
||||
tag.companion_tag = Some(CompanionTag::Matroska(remainder.0));
|
||||
}
|
||||
|
||||
tag
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue