From cfba04bc9d1c9f9acf723aa99e60319ae0aa2b18 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 14 Nov 2015 14:58:53 -0800 Subject: [PATCH] Don't ask for confirmation if nothing changed --- beetsplug/edit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beetsplug/edit.py b/beetsplug/edit.py index 5cbf19ea2..3a22d014e 100644 --- a/beetsplug/edit.py +++ b/beetsplug/edit.py @@ -221,8 +221,12 @@ class EditPlugin(plugins.BeetsPlugin): """Save a list of updated Model objects to the database. """ # Display and confirm the changes. + changed = False for obj in objs: - ui.show_model_changes(obj) + changed |= ui.show_model_changes(obj) + if not changed: + ui.print_('No changes to apply.') + return if not ui.input_yn('Apply changes? (y/n)'): return