mirror of
https://github.com/beetbox/beets.git
synced 2026-01-27 02:23:36 +01:00
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:
parent
b1bb2e5c80
commit
fe886d363a
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue