From fe886d363a55ac85ec959235e55ea0b5c3b39ec8 Mon Sep 17 00:00:00 2001 From: Dale Sedivec Date: Mon, 24 Jun 2013 00:17:37 -0500 Subject: [PATCH] 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. --- beets/library.py | 1 + 1 file changed, 1 insertion(+) diff --git a/beets/library.py b/beets/library.py index 7696541fa..c42436580 100644 --- a/beets/library.py +++ b/beets/library.py @@ -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