'Add a field that is synchronized between media files and items.
When a media field is added ``item.write()`` will set the name
property of the item\'s MediaFile to ``item[name]`` and save the
changes. Similarly ``item.read()`` will set ``item[name]`` to
the value of the name property of the media file.
``descriptor`` must be an instance of ``mediafile.MediaField``.'

def add_media_field(self, name, descriptor):

    from beets import library
    mediafile.MediaFile.add_field(name, descriptor)
    library.Item._media_fields.add(name)
