DOCS The plugin stages now receive the ImportSession as first argument

This commit is contained in:
Taeyeon Mori 2015-03-01 19:49:31 +01:00
parent a4dd46dea3
commit ddf86af3a0

View file

@ -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: