From f150d76b55e76f9c7363698a2deed89e27fece75 Mon Sep 17 00:00:00 2001 From: Jos van der Til Date: Mon, 21 Nov 2011 20:41:43 +0100 Subject: [PATCH] Handled the case where file_mtime was changed, but no metadata was changed --HG-- extra : transplant_source : %D0%DB%B1r%1D%CAh%23%3D%0C%E0%90%21%CA%7B%97%CE%F0u%19 --- beets/ui/commands.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 987ea7037..9648af526 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -761,7 +761,12 @@ def update_items(lib, query, album, move, color, pretend): lib.store(item) affected_albums.add(item.album_id) - + else: + if not pretend: + # file_mtime is different, but no changes to the metadata. + # store the new mtime so we don't check this again in the future. + setattr(item, 'file_mtime', os.path.getmtime(syspath(item.path))) + # Skip album changes while pretending. if pretend: return