mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 17:46:42 +01:00
add clear_changes
This commit is contained in:
parent
36423fc994
commit
38f97558a7
3 changed files with 25 additions and 17 deletions
11
src/model.rs
11
src/model.rs
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue