Send a plug-in event when file is moved

I use this in one of my plug-ins to notice when I've moved all the audio
files in an album from one directory to another, at which point I move
any associated non-album files to the new directory and delete the old
directory.
This commit is contained in:
Dale Sedivec 2013-06-24 00:17:37 -05:00
parent b1bb2e5c80
commit fe886d363a

View file

@ -370,6 +370,7 @@ class Item(object):
util.copy(self.path, dest)
else:
util.move(self.path, dest)
plugins.send("item_moved", source=self.path, destination=dest)
# Either copying or moving succeeded, so update the stored path.
self.path = dest