Commit Graph

331 Commits

Author SHA1 Message Date
Sebastian Mohr
54a2bd20e1 Removed This file is part of beets... headers. 2026-06-29 11:20:15 +02:00
Šarūnas Nejus
ca3fdb7aef Remove Resolution from ImportSessionFixture 2026-06-17 15:11:27 +01:00
Sebastian Mohr
1368efd4dd Pytest based setup for ImportTest, now TestImport. 2026-06-16 17:14:03 +02:00
Sebastian Mohr
1fe0e34201 Removed capture_log 🎉 2026-06-16 17:14:03 +02:00
Sebastian Mohr
2797fcd896 ImportPretendTest -> TestImportPretend:
AutotagImportTestCase` is not needed: pretend mode skips autotagging
entirely (`session.py:201`: `if pretend -> log_files` bypasses
`lookup_candidates`).
2026-06-16 17:14:03 +02:00
Sebastian Mohr
922b568bd8 Replaced instances of capture_log with caplog 2026-06-16 17:14:03 +02:00
Šarūnas Nejus
912ab791d9 Exclude tests that depend on ffprobe when unavailable 2026-06-13 01:46:44 +01:00
Sebastian Mohr
69100c7946 test_importer: ImportTestCase -> ImporterHelper 2026-06-11 10:39:14 +02:00
Šarūnas Nejus
648f24cbc2 Enable and fix flake8-builtins 2026-06-09 00:14:06 +01:00
Šarūnas Nejus
d53ee774a9 Enable and fix flake8-return 2026-06-09 00:14:06 +01:00
Šarūnas Nejus
29580d2f00 Import everything from parent beets.autotag 2026-06-02 08:57:35 +01:00
Sebastian Mohr
adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Alok Saboo
c5373e6964 fix format 2026-05-13 20:58:18 -04:00
Alok Saboo
8b2e3a5563 test: address reviewer comments in threaded duplicate merge test 2026-05-13 20:53:53 -04:00
Alok Saboo
7fc6284d95 fix: improve context propagation and add threaded regression test 2026-05-10 11:17:37 -04:00
John Parton
c6ca91d91f Make directories unique by using incrementing integer. 2026-04-22 22:31:36 +01:00
John Parton
79d7a76add Fix error in test. 2026-04-22 22:31:36 +01:00
John Parton
b459ad1fe0 Add variety to suffixes in test. Add explicit test that 'CD01' and 'Enhanced CD02' should not be combined. 2026-04-22 22:31:36 +01:00
John Parton
41c536facc Make test markers more varied. Cover more cases. 2026-04-22 22:31:36 +01:00
John Parton
0b3fa014b5 Reformat py/rst, fix linting/formatting errors. 2026-04-22 22:31:36 +01:00
John Parton
c63bb045ee Allow for vinyl (including 12 vinyl), cassette, and digital media multi-disc releases. 2026-04-22 22:31:36 +01:00
Šarūnas Nejus
ccdccdfa8d Remove slow_test unittest marker 2026-04-22 21:47:16 +01:00
Šarūnas Nejus
2f326b6bdb Remove old cover art instead of keeping it 2026-04-21 22:09:38 +01:00
Šarūnas Nejus
9e48d9b16a Reproduce the issue 2026-04-21 22:09:38 +01:00
Spencer Nystrom
5f241353da Remove archive on import during move mode
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.
2026-04-18 22:00:43 -07:00
Elaine Chen
3f5bb512eb Renamed to public function remux_mpeglayer3_wav 2026-04-14 16:16:46 -04:00
Elaine Chen
e7247b54aa Moved remux function to util.extension, fixed exception handling, added docs 2026-04-14 15:53:43 -04:00
Elaine Chen
480e67c7bf Replaced ffmpeg with Python extraction, add docs, and second test 2026-04-14 12:39:08 -04:00
Elaine Chen
b3ef429788 Use shutil.which to detect ffmpeg for test skip condition 2026-04-11 18:44:22 -04:00
elainec2024
ec26ab806c Merge branch 'master' into fix-mpeglayer3-wav-import 2026-04-11 18:06:05 -04:00
Elaine Chen
7a20252807 Fix test to not depend on mediafile fix being installed 2026-04-11 18:03:35 -04:00
Elaine Chen
8ea269362c Remux WAVE_FORMAT_MPEGLAYER3 WAV files to MP3 during import
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
2026-04-11 17:36:13 -04:00
laogao216
652733a768 format 2026-03-29 17:43:41 +02:00
laogao216
2285671223 refactoring and other improvements 2026-03-29 17:41:28 +02:00
laogao216
31d4a1209b add config & doc, refactor, optimize 2026-03-29 04:51:54 +02:00
laogao216
c3967ca1b2 Sync fork with master and paste in changes 2026-03-28 22:10:03 +01:00
Šarūnas Nejus
b8def07121 autotag: use explicit imports 2026-03-28 12:26:27 +00:00
Šarūnas Nejus
5fad834ad2 Ensure we use Distance to initialise Match objects 2026-03-22 19:23:53 +00:00
Šarūnas Nejus
094d5bfb9d Return album candidates from multiple sources when matching by IDs 2026-03-10 00:55:38 +00:00
Axel Wikström
b5d8ced9d9 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 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>
2026-03-04 14:26:13 +00:00
Dmitri Vassilenko
df7db24871 Fix symlink tests for macOS 2026-03-02 09:24:25 +00:00
Šarūnas Nejus
a540a8174a Clarify tests 2026-02-27 18:36:04 +00:00
Šarūnas Nejus
a8d53f78de Fix the rest of the tests 2026-02-27 18:34:26 +00:00
rdy2go
4e2ebabb92 Merge branch 'master' into master 2025-07-23 19:44:17 +02:00
Šarūnas Nejus
21459c70ee importer: provides search_ids into lookup_candidates explicitly 2025-07-16 14:06:33 +01:00
Sebastian Mohr
178e27f11f Fixed imports for all tests and added a bit of stricter type checking. 2025-07-15 15:03:14 +02:00
Šarūnas Nejus
0dd6cb3b6d Replace assert_equal_path 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
43b8cce063 Replace assertIsDir 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
e36e8f1f51 Remove assert_file_in_lib 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
452644bbf3 Remove assert_lib_dir_empty 2025-07-09 09:21:49 +01:00