add clear_changes

This commit is contained in:
🪞👃🪞 2025-04-06 19:46:01 +03:00
parent 36423fc994
commit 38f97558a7
3 changed files with 25 additions and 17 deletions

View file

@ -69,4 +69,15 @@ impl Taggart {
self.changes = changes;
self.changes
}
/// Clear all modified tags.
pub(crate) fn clear_changes (&mut self) {
for entry in self.entries.iter_mut() {
if let Metadata::Music {
modified_tag, ..
} = &mut *entry.info.write().unwrap() {
*modified_tag = None;
}
}
self.changes = 0;
}
}