diff --git a/beets/library.py b/beets/library.py index 139cdfec0..132df4f52 100644 --- a/beets/library.py +++ b/beets/library.py @@ -270,15 +270,15 @@ class LibModel(dbcore.Model): def store(self): super(LibModel, self).store() - plugins.send('database_change', lib=self._db) + plugins.send('database_change', lib=self._db, model=self) def remove(self): super(LibModel, self).remove() - plugins.send('database_change', lib=self._db) + plugins.send('database_change', lib=self._db, model=self) def add(self, lib=None): super(LibModel, self).add(lib) - plugins.send('database_change', lib=self._db) + plugins.send('database_change', lib=self._db, model=self) def __format__(self, spec): if not spec: diff --git a/beetsplug/mpdupdate.py b/beetsplug/mpdupdate.py index 96141c567..dfe402497 100644 --- a/beetsplug/mpdupdate.py +++ b/beetsplug/mpdupdate.py @@ -80,7 +80,7 @@ class MPDUpdatePlugin(BeetsPlugin): self.register_listener('database_change', self.db_change) - def db_change(self, lib): + def db_change(self, lib, model): self.register_listener('cli_exit', self.update) def update(self, lib): diff --git a/beetsplug/plexupdate.py b/beetsplug/plexupdate.py index 9781e300e..5aa096486 100644 --- a/beetsplug/plexupdate.py +++ b/beetsplug/plexupdate.py @@ -55,7 +55,7 @@ class PlexUpdate(BeetsPlugin): self.register_listener('database_change', self.listen_for_db_change) - def listen_for_db_change(self, lib): + def listen_for_db_change(self, lib, model): """Listens for beets db change and register the update for the end""" self.register_listener('cli_exit', self.update) diff --git a/beetsplug/smartplaylist.py b/beetsplug/smartplaylist.py index e2c256b2b..a9c0a25aa 100644 --- a/beetsplug/smartplaylist.py +++ b/beetsplug/smartplaylist.py @@ -65,7 +65,7 @@ class SmartPlaylistPlugin(BeetsPlugin): spl_update.func = update return [spl_update] - def db_change(self, lib): + def db_change(self, lib, model): self.register_listener('cli_exit', self.update_playlists) def update_playlists(self, lib):