mediafile: update docs for MediaFile split

This commit is contained in:
Carl Suster 2019-05-19 12:07:06 +10:00
parent 546bf3af7e
commit 1289efeeee
3 changed files with 9 additions and 27 deletions

View file

@ -4,8 +4,12 @@ For Developers
This section contains information for developers. Read on if you're interested
in hacking beets itself or creating plugins for it.
See also the documentation for `MediaFile`_, the library used by beets to read
and write metadata tags in media files.
.. _MediaFile: http://mediafile.readthedocs.io/
.. toctree::
plugins
api
media_file

View file

@ -1,21 +0,0 @@
.. _mediafile:
MediaFile
---------
.. currentmodule:: beets.mediafile
.. autoclass:: MediaFile
.. automethod:: __init__
.. automethod:: fields
.. automethod:: readable_fields
.. automethod:: save
.. automethod:: update
.. autoclass:: MediaField
.. automethod:: __init__
.. autoclass:: StorageStyle
:members:

View file

@ -370,17 +370,16 @@ template fields by adding a function accepting an ``Album`` argument to the
Extend MediaFile
^^^^^^^^^^^^^^^^
:ref:`MediaFile` is the file tag abstraction layer that beets uses to make
`MediaFile`_ is the file tag abstraction layer that beets uses to make
cross-format metadata manipulation simple. Plugins can add fields to MediaFile
to extend the kinds of metadata that they can easily manage.
The ``MediaFile`` class uses ``MediaField`` descriptors to provide
access to file tags. Have a look at the ``beets.mediafile`` source code
to learn how to use this descriptor class. If you have created a
descriptor you can add it through your plugins ``add_media_field()``
method.
access to file tags. If you have created a descriptor you can add it through
your plugins ``add_media_field()`` method.
.. automethod:: beets.plugins.BeetsPlugin.add_media_field
.. _MediaFile: http://mediafile.readthedocs.io/
Here's an example plugin that provides a meaningless new field "foo"::