diff --git a/beetsplug/parentwork.py b/beetsplug/parentwork.py index e2460e875..e4978ebf4 100644 --- a/beetsplug/parentwork.py +++ b/beetsplug/parentwork.py @@ -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']) diff --git a/docs/plugins/parentwork.rst b/docs/plugins/parentwork.rst index 9707650b4..e25f01395 100644 --- a/docs/plugins/parentwork.rst +++ b/docs/plugins/parentwork.rst @@ -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`).