This modifies the `cleanup` method on the `ArchiveImportTask` to remove the original archive file on successful import when `move: yes`.
I decided to do this such that partial imports do not destructively remove the archive. Perhaps this would be better as a configuration option, but I think that may go beyond the scope for this initial feature.
Additionally, I added unit tests for this behavior under the *old* test framework since existing helpers are present for the archive backend setup. This way we minimize the diff and maximize probability that my test is behaving correctly. I will gladly port this entire archive test section to pytest in a future PR.
Closes#1663.
WAV files containing an MP3 stream (WAVE_FORMAT_MPEGLAYER3, wFormatTag=0x0055)
were silently imported with incorrect metadata and format reported as WAVE instead of MP3.
When a WAV file fails to open due to FileTypeError, check if it is a
MPEGLAYER3 WAV. If it is, use ffmpeg to remux it to a proper MP3 file,
removing the WAV container. The original WAV file is deleted after successful
remuxing.
Adds a regression test and test fixture.
Fixes#6455
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 79d1203541 (Sep 2014): "We should also resolve duplicates when
not autotagging." The FIXME was later removed during a comment cleanup
(f145e3b18) 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.
This applies to both album imports and singleton imports.
Test changes:
- Renamed test_no_autotag_keeps_duplicate_album to
test_no_autotag_removes_duplicate_album to verify the corrected behavior
- Added test_no_autotag_removes_duplicate_singleton to verify singleton
duplicate detection also works with autotag=no
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>