beetbox / beetbox/beets

Re-import detection should permit partial and multiple overlap

Open
#702 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

_Re-imports_ occur when the user wants to re-tag some files that are already in their library. Currently, an album is considered a re-import only when it has exactly the same set of paths as an existing album. We should also permit re-imports that:
- Partially overlap with an existing album. This happens when the user wants to add tracks to an existing album, as in #112.
- Consist of multiple albums. This happens when the user erroneously imported a multi-disc album as separate albums initially but wants to re-import them together (e.g., with `--flat`).

The point where this is detected is in `beets.importer._duplicate_check`. We also need to support the appropriate replacement action in `apply_choices`.

This is especially pernicious since the user sees a "this album is already in the library!" prompt when the re-import check fails. If they choose "remove old", then some of the files being imported are deleted. No good!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.