From b6b792c5ea57dee19ebe17330ce8d2c39b4249c8 Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Sat, 13 Dec 2014 21:18:26 +0000 Subject: Update file info on move --- watcher.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'watcher.py') diff --git a/watcher.py b/watcher.py index 7dbd434..d1e4ab6 100644 --- a/watcher.py +++ b/watcher.py @@ -19,6 +19,9 @@ class EventHandler(pyinotify.ProcessEvent): print("Moved to:", event.pathname) library.update_track_filename(event.src_pathname, event.pathname) + # moving the file may also hint that the metadata has changed + library.update_file(event.pathname) + def process_IN_MODIFY(self, event): print("Modified:", event.pathname) library.update_file(event.pathname) -- cgit v1.2.3