Commit d77142c
Enable duplicate detection for as-is imports
When importing with autotag=no, duplicate detection was skipped entirely
because the import_asis stage called _apply_choice() directly without
first calling _resolve_duplicates(). This meant the duplicate_keys and
duplicate_action config options were ignored for as-is imports.
This was a known limitation documented by a FIXME comment added in
commit 79d1203 (Sep 2014): "We should also resolve duplicates when
not autotagging." The FIXME was later removed during a comment cleanup
(f145e3b) but the issue was never addressed.
This commit adds the _resolve_duplicates() call to import_asis, ensuring
duplicate detection works consistently regardless of the autotag setting.
The test test_no_autotag_keeps_duplicate_album has been updated to
test_no_autotag_removes_duplicate_album to verify the corrected behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent c04fc95 commit d77142c
2 files changed
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
948 | | - | |
| 948 | + | |
949 | 949 | | |
| 950 | + | |
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
953 | 954 | | |
954 | | - | |
955 | | - | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
956 | 958 | | |
957 | 959 | | |
958 | 960 | | |
959 | 961 | | |
960 | | - | |
961 | | - | |
962 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
963 | 965 | | |
| 966 | + | |
964 | 967 | | |
965 | 968 | | |
966 | 969 | | |
967 | 970 | | |
968 | | - | |
969 | | - | |
970 | | - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
971 | 976 | | |
972 | 977 | | |
973 | 978 | | |
| |||
0 commit comments