mirror of
https://github.com/beetbox/beets.git
synced 2026-12-03 21:41:29 -06:00
Only output verbose details for parentwork plugin when running explicitly (#5135)
Fixes #4120.
This commit is contained in:
+17
-16
@@ -89,7 +89,7 @@ class ParentWorkPlugin(BeetsPlugin):
|
||||
write = ui.should_write()
|
||||
|
||||
for item in lib.items(ui.decargs(args)):
|
||||
changed = self.find_work(item, force_parent)
|
||||
changed = self.find_work(item, force_parent, verbose=True)
|
||||
if changed:
|
||||
item.store()
|
||||
if write:
|
||||
@@ -116,7 +116,7 @@ class ParentWorkPlugin(BeetsPlugin):
|
||||
force_parent = self.config["force"].get(bool)
|
||||
|
||||
for item in task.imported_items():
|
||||
self.find_work(item, force_parent)
|
||||
self.find_work(item, force_parent, verbose=False)
|
||||
item.store()
|
||||
|
||||
def get_info(self, item, work_info):
|
||||
@@ -165,7 +165,7 @@ class ParentWorkPlugin(BeetsPlugin):
|
||||
|
||||
return parentwork_info
|
||||
|
||||
def find_work(self, item, force):
|
||||
def find_work(self, item, force, verbose):
|
||||
"""Finds the parent work of a recording and populates the tags
|
||||
accordingly.
|
||||
|
||||
@@ -221,16 +221,17 @@ add one at https://musicbrainz.org/recording/{}",
|
||||
|
||||
if work_date:
|
||||
item["work_date"] = work_date
|
||||
return ui.show_model_changes(
|
||||
item,
|
||||
fields=[
|
||||
"parentwork",
|
||||
"parentwork_disambig",
|
||||
"mb_parentworkid",
|
||||
"parent_composer",
|
||||
"parent_composer_sort",
|
||||
"work_date",
|
||||
"parentwork_workid_current",
|
||||
"parentwork_date",
|
||||
],
|
||||
)
|
||||
if verbose:
|
||||
return ui.show_model_changes(
|
||||
item,
|
||||
fields=[
|
||||
"parentwork",
|
||||
"parentwork_disambig",
|
||||
"mb_parentworkid",
|
||||
"parent_composer",
|
||||
"parent_composer_sort",
|
||||
"work_date",
|
||||
"parentwork_workid_current",
|
||||
"parentwork_date",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -83,6 +83,7 @@ Bug fixes:
|
||||
lyrics.
|
||||
:bug:`5583`
|
||||
* ImageMagick 7.1.1-44 is now supported.
|
||||
* :doc:`plugins/parentwork`: Only output parentwork changes when running in verbose mode.
|
||||
|
||||
For packagers:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user