summaryrefslogtreecommitdiff
path: root/watcher.py
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@gmail.com>2014-12-13 21:18:26 +0000
committerMichaël Ball <michael.ball@gmail.com>2014-12-13 21:18:26 +0000
commitb6b792c5ea57dee19ebe17330ce8d2c39b4249c8 (patch)
tree73d862bd770cbaaa4ad0e8679f15503a912746b5 /watcher.py
parentcd630834a985be4b39a673d022e180de3ff20517 (diff)
Update file info on move
Diffstat (limited to 'watcher.py')
-rw-r--r--watcher.py3
1 files changed, 3 insertions, 0 deletions
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)