Add back RiffTag::date

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
This commit is contained in:
Serial 2021-07-08 22:01:24 -04:00
parent 12b97fa44f
commit 9878b5172f
2 changed files with 11 additions and 1 deletions

View file

@ -100,7 +100,7 @@ pub(crate) fn write_to(
f if f == b"(c) " && copy.is_none() => copy = Some((pos, (pos + 8 + size as usize))),
_ => {
data.seek(SeekFrom::Current(i64::from(size)))?;
continue
continue;
},
}

View file

@ -77,6 +77,16 @@ impl AudioTagEdit for RiffTag {
self.remove_key("IART")
}
fn date(&self) -> Option<String> {
self.get_value("ICRD").map(std::string::ToString::to_string)
}
fn set_date(&mut self, date: &str) {
self.set_value("ICRD", date)
}
fn remove_date(&mut self) {
self.remove_key("ICRD")
}
fn copyright(&self) -> Option<&str> {
self.get_value("ICOP")
}