From 765f7dc12d6732a9536df715cc3ac4f0d63aa57e Mon Sep 17 00:00:00 2001 From: Dorian Soergel Date: Fri, 7 Jun 2019 14:57:38 +0200 Subject: [PATCH] first try to implement event handler --- beetsplug/parentwork.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/beetsplug/parentwork.py b/beetsplug/parentwork.py index 2c5af03d1..ee892e825 100644 --- a/beetsplug/parentwork.py +++ b/beetsplug/parentwork.py @@ -77,9 +77,14 @@ class ParentWorkPlugin(BeetsPlugin): 'auto': False, 'force': False, }) + if self.config['auto']: self.import_stages = [self.imported] + self.register_listener('database_change', self.find_work2) + + def find_work2(self, lib, model): + self.find_work(model, True) def commands(self):