Debian Codegraph @

docs/plugins/parentwork.rst

raw
1 ParentWork Plugin
2 =================
3
4 The ``parentwork`` plugin fetches the work title, parent work title and parent
5 work composer from MusicBrainz.
6
7 In the MusicBrainz database, a recording can be associated with a work. A work
8 can itself be associated with another work, for example one being part of the
9 other (what we call the *direct parent*). This plugin looks the work id from the
10 library and then looks up the direct parent, then the direct parent of the
11 direct parent and so on until it reaches the top. The work at the top is what we
12 call the *parent work*.
13
14 This plugin is especially designed for classical music. For classical music,
15 just fetching the work title as in MusicBrainz is not satisfying, because
16 MusicBrainz has separate works for, for example, all the movements of a
17 symphony. This plugin aims to solve this problem by also fetching the parent
18 work, which would be the whole symphony in this example.
19
20 The plugin can detect changes in ``mb_workid`` so it knows when to re-fetch
21 other metadata, such as ``parentwork``. To do this, when it runs, it stores a
22 copy of ``mb_workid`` in the bookkeeping field ``parentwork_workid_current``. At
23 any later run of ``beet parentwork`` it will check if the tags ``mb_workid`` and
24 ``parentwork_workid_current`` are still identical. If it is not the case, it
25 means the work has changed and all the tags need to be fetched again.
26
27 This plugin adds seven tags:
28
29 - **parentwork**: The title of the parent work.
30 - **mb_parentworkid**: The MusicBrainz id of the parent work.
31 - **parentwork_disambig**: The disambiguation of the parent work title.
32 - **parent_composer**: The composer of the parent work.
33 - **parent_composer_sort**: The sort name of the parent work composer.
34 - **work_date**: The composition date of the work, or the first parent work that
35 has a composition date. Format: yyyy-mm-dd.
36 - **parentwork_workid_current**: The MusicBrainz id of the work as it was when
37 the parentwork was retrieved. This tag exists only for internal bookkeeping,
38 to keep track of recordings whose works have changed.
39 - **parentwork_date**: The composition date of the parent work.
40
41 Configuration
42 -------------
43
44 To configure the plugin, make a ``parentwork:`` section in your configuration
45 file. The available options are:
46
47 - **force**: As a default, ``parentwork`` only fetches work info for recordings
48 that do not already have a ``parentwork`` tag or where ``mb_workid`` differs
49 from ``parentwork_workid_current``. If ``force`` is enabled, it fetches it for
50 all recordings. Default: ``no``
51 - **auto**: If enabled, automatically fetches works at import. It takes quite
52 some time, because beets is restricted to one MusicBrainz query per second.
53 Default: ``no``