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
This commit is contained in:
Jos van der Til 2011-11-21 20:41:43 +01:00
parent 2c81ee736c
commit f150d76b55

View file

@ -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