From d95d4428fe16ca1cbb785f148ea2476d41c8e6c6 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Tue, 11 Mar 2014 16:28:47 +0100 Subject: [PATCH] Add more documentation to MediaFile --- beets/mediafile.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beets/mediafile.py b/beets/mediafile.py index 6c952c002..212b1b21f 100644 --- a/beets/mediafile.py +++ b/beets/mediafile.py @@ -27,6 +27,10 @@ Usage: A field will always return a reasonable value of the correct type, even if no tag is present. If no value is available, the value will be false (e.g., zero or the empty string). + +Internally ``MediaFile`` uses ``MediaField`` descriptors to access the +data from the tags. In turn ``MediaField`` uses a number of +``StorageStyle`` strategies to handle format specific logic. """ import mutagen import mutagen.mp3 @@ -464,6 +468,10 @@ class StorageStyle(object): class ListStorageStyle(StorageStyle): """Abstract storage style that provides access to lists. + The ListMediaField descriptor uses a ListStorageStyle via two + methods: ``get_list()`` and ``set_list()``. It passes a Mutagen file + object to each. + Subclasses may overwrite ``fetch`` and ``store``. ``fetch`` must return a (possibly empty) list and ``store`` receives a serialized list of values as the second argument.