mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 09:33:46 +01:00
Only output verbose details for parentwork plugin when running explicitly (#5135)
Fixes #4120.
This commit is contained in:
parent
5d010e95ec
commit
ecdff785f7
2 changed files with 18 additions and 16 deletions
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue