Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions beets/config_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import:
album: albumartist album
item: artist title
duplicate_action: ask
duplicate_verbose_prompt: no
bell: no
set_fields: {}
ignored_alias_types: []
Expand Down
9 changes: 9 additions & 0 deletions beets/ui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,11 +872,20 @@ def resolve_duplicate(self, task, found_duplicates):
list(duplicate.items()) if task.is_album else [duplicate],
not task.is_album,
))
if config['import']['duplicate_verbose_prompt']:
if task.is_album:
for dup in duplicate.items():
print(f" {dup}")
else:
print(f" {duplicate}")

print_("New: " + summarize_items(
task.imported_items(),
not task.is_album,
))
if config['import']['duplicate_verbose_prompt']:
for item in task.imported_items():
print(f" {item}")

sel = ui.input_options(
('Skip new', 'Keep all', 'Remove old', 'Merge all')
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ New features:
:bug: `4863`
* Make ArtResizer work with :pypi:`PIL`/:pypi:`pillow` 10.0.0 removals.
:bug:`4869`
* A new configuration option, :ref:`duplicate_verbose_prompt`, allows changing
how duplicates are presented during import.
:bug: `4866`

Bug fixes:

Expand Down
23 changes: 23 additions & 0 deletions docs/reference/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,29 @@ Controls how duplicates are treated in import task.
item; "merge" means merge into one album; "ask" means the user
should be prompted for the action each time. The default is ``ask``.

.. _duplicate_verbose_prompt:

duplicate_verbose_prompt
~~~~~~~~~~~~~~~~~~~~~~~~

Usually when duplicates are detected during import, information about the
existing and the newly imported album is summarized. Enabling this option also
lists details on individual tracks. The :ref:`format_item setting
<format_item>` is applied, which would, considering the default, look like
this:

.. code-block:: console

This item is already in the library!
Old: 1 items, MP3, 320kbps, 5:56, 13.6 MiB
Artist Name - Album Name - Third Track Title
New: 2 items, MP3, 320kbps, 7:18, 17.1 MiB
Artist Name - Album Name - First Track Title
Artist Name - Album Name - Second Track Title
[S]kip new, Keep all, Remove old, Merge all?

Default: ``no``.

.. _bell:

bell
Expand Down