Merge pull request #1341 from Orochimarufan/master

DOCS The plugin stages now receive the ImportSession as first argument
This commit is contained in:
Adrian Sampson 2015-03-01 12:09:51 -08:00
commit db18379bba

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: