mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 05:34:47 +01:00
small changes, docs
This commit is contained in:
parent
c948530279
commit
1f93ce5a49
2 changed files with 8 additions and 5 deletions
|
|
@ -174,16 +174,16 @@ add one at https://musicbrainz.org/recording/{}', item, item.mb_trackid)
|
|||
|
||||
hasparent = hasattr(item, 'parentwork')
|
||||
workfalse = True
|
||||
if hasattr(item, 'mb_workid_current'):
|
||||
if hasattr(item, 'parentwork_workid_current'):
|
||||
workfalse = item.mb_workid_current != item.mb_workid
|
||||
if force or (not hasparent) or workfalse:
|
||||
if force or not hasparent or workfalse:
|
||||
try:
|
||||
work_info, work_date = find_parentwork_info(item.mb_workid)
|
||||
except musicbrainzngs.musicbrainz.WebServiceError as e:
|
||||
self._log.debug("error fetching work: {}", e)
|
||||
return
|
||||
parent_info = self.get_info(item, work_info)
|
||||
parent_info['mb_workid_current'] = item.mb_workid
|
||||
parent_info['parentwork_workid_current'] = item.mb_workid
|
||||
if 'parent_composer' in parent_info:
|
||||
self._log.debug("Work fetched: {} - {}",
|
||||
parent_info['parentwork'],
|
||||
|
|
@ -207,4 +207,4 @@ add one at https://musicbrainz.org/recording/{}', item, item.mb_trackid)
|
|||
item, fields=['parentwork', 'parentwork_disambig',
|
||||
'mb_parentworkid', 'parent_composer',
|
||||
'parent_composer_sort', 'work_date',
|
||||
'mb_workid_current'])
|
||||
'parentwork_workid_current'])
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ example, all the movements of a symphony. This plugin aims to solve this
|
|||
problem by also fetching the parent work, which would be the whole symphony in
|
||||
this example.
|
||||
|
||||
This plugin adds five tags:
|
||||
This plugin adds six tags:
|
||||
|
||||
- **parentwork**: The title of the parent work.
|
||||
- **mb_parentworkid**: The musicbrainz id of the parent work.
|
||||
|
|
@ -27,6 +27,9 @@ This plugin adds five tags:
|
|||
- **parent_composer_sort**: The sort name of the parent work composer.
|
||||
- **work_date**: The composition date of the work, or the first parent work
|
||||
that has a composition date. Format: yyyy-mm-dd.
|
||||
- **parentwork_workid_current**: The musicbrainz id of the work as it was when
|
||||
the parentwork was retrieved. This tag exists only for internal bookkeeping,
|
||||
to keep track of recordings whose work have changed.
|
||||
|
||||
To use the ``parentwork`` plugin, enable it in your configuration (see
|
||||
:ref:`using-plugins`).
|
||||
|
|
|
|||
Loading…
Reference in a new issue