From 0131d253ee676a5491f80952931e6bd34950acea Mon Sep 17 00:00:00 2001 From: Dorian Soergel Date: Sun, 26 May 2019 15:10:18 +0200 Subject: [PATCH] replace work_id by mb_workid everywhere --- beets/autotag/__init__.py | 6 +++--- beets/autotag/hooks.py | 6 +++--- beets/autotag/mb.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index e6153478a..ede4fbe12 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -56,8 +56,8 @@ def apply_item_metadata(item, track_info): item.arranger = track_info.arranger if track_info.work is not None: item.work = track_info.work - if track_info.work_id is not None: - item.work_id = track_info.work_id + if track_info.mb_workid is not None: + item.mb_workid = track_info.mb_workid if track_info.work_disambig is not None: item.work_disambig = track_info.work_disambig @@ -174,7 +174,7 @@ def apply_metadata(album_info, mapping): 'composer_sort', 'arranger', 'work', - 'work_id', + 'mb_workid', 'work_disambig', ) } diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py index 942b8bd7f..57cd1c309 100644 --- a/beets/autotag/hooks.py +++ b/beets/autotag/hooks.py @@ -160,7 +160,7 @@ class TrackInfo(object): - ``arranger`: individual track arranger name - ``track_alt``: alternative track number (tape, vinyl, etc.) - ``work`: individual track work title - - ``work_id`: individual track work id + - ``mb_workid`: individual track work id - ``work_disambig`: individual track work diambiguation Only ``title`` and ``track_id`` are required. The rest of the fields @@ -173,7 +173,7 @@ class TrackInfo(object): disctitle=None, artist_credit=None, data_source=None, data_url=None, media=None, lyricist=None, composer=None, composer_sort=None, arranger=None, track_alt=None, - work=None, work_id=None, work_disambig=None): + work=None, mb_workid=None, work_disambig=None): self.title = title self.track_id = track_id self.release_track_id = release_track_id @@ -196,7 +196,7 @@ class TrackInfo(object): self.arranger = arranger self.track_alt = track_alt self.work = work - self.work_id = work_id + self.mb_workid = mb_workid self.work_disambig = work_disambig # As above, work around a bug in python-musicbrainz-ngs. diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 177411034..a7bb6566d 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -211,13 +211,13 @@ def track_info(recording, index=None, medium=None, medium_index=None, composer = [] composer_sort = [] work = [] - work_id = [] + mb_workid = [] work_disambig = [] for work_relation in recording.get('work-relation-list', ()): if work_relation['type'] != 'performance': continue work.append(work_relation['work']['title']) - work_id.append(work_relation['work']['id']) + mb_workid.append(work_relation['work']['id']) if 'disambiguation' in work_relation['work']: work_disambig.append(work_relation['work']['disambiguation']) @@ -247,7 +247,7 @@ def track_info(recording, index=None, medium=None, medium_index=None, info.arranger = u', '.join(arranger) if work: info.work = u', '.join(work) - info.work_id = u', '.join(work_id) + info.mb_workid = u', '.join(mb_workid) info.work_disambig = u', '.join(work_disambig) info.decode()