From ddf86af3a0fa1129bb12781aa196dbc7532aa585 Mon Sep 17 00:00:00 2001 From: Taeyeon Mori Date: Sun, 1 Mar 2015 19:49:31 +0100 Subject: [PATCH] DOCS The plugin stages now receive the ImportSession as first argument --- docs/dev/plugins.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/plugins.rst b/docs/dev/plugins.rst index f448b5dfa..79a3f7354 100644 --- a/docs/dev/plugins.rst +++ b/docs/dev/plugins.rst @@ -382,7 +382,7 @@ Multiple stages run in parallel but each stage processes only one task at a time and each task is processed by only one stage at a time. Plugins provide stages as functions that take two arguments: ``config`` and -``task``, which are ``ImportConfig`` and ``ImportTask`` objects (both defined in +``task``, which are ``ImportSession`` and ``ImportTask`` objects (both defined in ``beets.importer``). Add such a function to the plugin's ``import_stages`` field to register it:: @@ -391,7 +391,7 @@ to register it:: def __init__(self): super(ExamplePlugin, self).__init__() self.import_stages = [self.stage] - def stage(self, config, task): + def stage(self, session, task): print('Importing something!') .. _extend-query: