From 1289efeeee543e65733e8aabc14e480b41945fba Mon Sep 17 00:00:00 2001 From: Carl Suster Date: Sun, 19 May 2019 12:07:06 +1000 Subject: [PATCH] mediafile: update docs for MediaFile split --- docs/dev/index.rst | 6 +++++- docs/dev/media_file.rst | 21 --------------------- docs/dev/plugins.rst | 9 ++++----- 3 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 docs/dev/media_file.rst diff --git a/docs/dev/index.rst b/docs/dev/index.rst index 82651a781..45640254c 100644 --- a/docs/dev/index.rst +++ b/docs/dev/index.rst @@ -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 diff --git a/docs/dev/media_file.rst b/docs/dev/media_file.rst deleted file mode 100644 index c703377d8..000000000 --- a/docs/dev/media_file.rst +++ /dev/null @@ -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: diff --git a/docs/dev/plugins.rst b/docs/dev/plugins.rst index 745c8340a..7cec77d62 100644 --- a/docs/dev/plugins.rst +++ b/docs/dev/plugins.rst @@ -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"::