Commit Graph
70 Commits
Author SHA1 Message Date
Šarūnas Nejus 03877cc20b move: fix moving albums in timid mode 2026-08-27 06:47:40 +01:00
Šarūnas Nejus e5846915d4 modify: fix selecting objects 2026-08-27 06:47:39 +01:00
Šarūnas Nejus efc7e4f206 remove: fix ui formatting and test it 2026-08-27 06:47:39 +01:00
Šarūnas Nejus 2971393618 Replace do_query with model-specific logic
This allows to define a proper return type for input_select_objects.
2026-08-27 06:47:39 +01:00
Šarūnas Nejus dd841f6b99 Test commands by CLI invocation 2026-08-27 01:31:43 +01:00
Šarūnas Nejus 914441da16 typing: fix command handlers types 2026-08-21 20:56:38 +01:00
Alok Saboo abacc3aad0 Merge branch 'master' into upgrade2 2026-08-11 08:19:15 -04:00
Alok Saboo e9d6c996ba remove dead code 2026-08-05 14:46:04 -04:00
Alok Saboo 1ddc95f7a6 address copilot comments 2026-08-05 09:05:51 -04:00
Alok Saboo cbe300f7ef Merge branch 'master' into upgrade2 2026-08-05 08:57:42 -04:00
Alok Saboo c19b6b42d8 add interactive upgrade option 2026-08-05 08:47:26 -04:00
Šarūnas Nejus 97904e7e16 Refactor autotag to use Source abstraction
Introduce Source class to encapsulate metadata extraction logic,
replacing scattered `get_most_common_tags` calls throughout codebase.

- Add Source class in importer.tasks with artist, name, and metadata
- Simplify `distance()` to accept Source.data instead of items list
- Update display functions to use Source objects
- Cache Source creation with @cached_property on ImportTask

This centralizes metadata handling and reduces coupling between
autotag and library modules.
2026-08-05 02:06:48 +01:00
Šarūnas Nejus 5933fcad85 Refactor template evaluation to handle format strings ONLY
- Handle formats as strings ONLY and evaluate them through a shared
  cached template helper.
- This removes the need for conditional logic that acts on Template
  objects or strings.
2026-08-05 01:56:59 +01:00
Vincent Gao 2fe5dc7a0e Fix storing flex media fields during update 2026-08-04 08:29:44 +02:00
Šarūnas Nejus b2f52ac124 Remove syspath 2026-07-30 12:18:49 +01:00
Šarūnas Nejus 951e32a852 Use pathlib.Path wherever possible in tests 2026-07-30 12:18:49 +01:00
Šarūnas Nejus 04c2304879 Replace item.path with item.filepath in tests 2026-07-30 12:18:49 +01:00
Šarūnas Nejus 02a2c5700a Make RSRC a pathlib.Path 2026-07-24 17:03:57 +01:00
Šarūnas Nejus d24c0d341e Rename PathsMixin.temp_dir_path to PathsMixin.temp_path for consistency 2026-07-21 11:15:25 +01:00
Šarūnas Nejus 2e9ace7b20 Replace PathsMixin.temp_dir attribute with PathsMixin.temp_dir_path 2026-07-21 11:15:25 +01:00
Šarūnas Nejus dc2826fa4b Replace TestHelper.libdir attribute with TestHelper.lib_path 2026-07-21 11:15:25 +01:00
Šarūnas Nejus 3f277ad5a0 typing: feed PathLike as database path 2026-07-16 13:11:16 +01:00
dong 7cc3e0b5a4 Support multi-value modify operators 2026-07-08 12:12:15 +01:00
Šarūnas Nejus 230bf19c7f Remove redundant test logic exposed by full coverage
- Removing the coverage omit configuration exposed unused branches, helpers, and
  fixtures across the test suite.
- Delete that redundant logic and simplify affected tests while preserving their
  behavior.
2026-07-07 15:57:35 +01:00
Sebastian Mohr 54a2bd20e1 Removed This file is part of beets... headers. 2026-06-29 11:20:15 +02:00
Sebastian Mohr 1368efd4dd Pytest based setup for ImportTest, now TestImport. 2026-06-16 17:14:03 +02:00
Šarūnas Nejus af27ed2ee6 Centralise RUNNING_IN_CI definition 2026-06-13 01:46:44 +01:00
Sebastian Mohr 8db903c8f8 Propagate rename to test_ui_importer 2026-06-11 10:39:14 +02:00
Sebastian Mohr fb2470dd0b Naming change in ui inheritance. 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 5be035f49d Enable and fix flake8-pie 2026-06-09 00:14:06 +01:00
Alok Saboo fe860fd75a fix copilot comments 2026-06-08 10:32:04 -04:00
Alok Saboo faa7deaf5d Enhance move command to handle missing files gracefully 2026-06-08 09:51:38 -04:00
Šarūnas Nejus d62e0952c0 Return KeysView from every keys method 2026-06-06 06:53:25 +01:00
Šarūnas Nejus 29580d2f00 Import everything from parent beets.autotag 2026-06-02 08:57:35 +01:00
Šarūnas Nejus 9efb7eabdb Clarify the logic inside get_path_formats 2026-05-24 15:09:58 +01:00
Šarūnas Nejus 0c227e9453 Define Library.path_formats property 2026-05-24 15:09:58 +01:00
李家成 495ab71e16 Merge branch 'master' of https://github.com/beetbox/beets into fix/album-mod-multivalue-string-splitting 2026-05-22 00:05:59 +08:00
Sebastian Mohr adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Betterlol 38423eb6f4 Fix album modify splitting multi-value strings into characters
When using `beet mod -a` to set a multi-value field (e.g. artists,
genres, composers) on an album, the value string was being split into
individual characters when propagated to items. This happened because:

1. `Album._type('artists')` returned `DEFAULT` since `artists` is not
   an Album fixed field, so `_parse` returned a plain string.
2. `DelimitedString.normalize` fell through to `model_type(value)`
   (= `list(value)`) for string input, splitting it into characters.

Two fixes:
- `DelimitedString.normalize`: handle string input by parsing it
  (splitting by delimiter if present) instead of calling `list()`.
- `Model._type`: fall back to the related model's field/type
  definitions so multi-value field types are recognized on both
  Album and Item.

Fixes #5690
2026-05-19 02:04:44 +08:00
Šarūnas Nejus 9e3f22b8be Do not move command desc to the next line 2026-05-17 07:38:50 +01:00
Šarūnas Nejus 6a2c451cc3 Reproduce the issue in a test 2026-05-17 07:35:56 +01:00
Šarūnas Nejus 30ab81eb5b Extract UserError from beets.ui to a new beets.exceptions module.
Update all references in core, plugins, and tests to import UserError
from the new location. This centralizes exception handling and improves
code organization.
2026-05-16 11:18:51 +01:00
Šarūnas Nejus ccdccdfa8d Remove slow_test unittest marker 2026-04-22 21:47:16 +01:00
Sebastian Mohr be057e8bbf Fixed tests 2026-04-22 22:20:01 +02:00
Šarūnas Nejus a2cb160064 Store item paths relative to library directory
Convert item paths to relative on write and back to absolute on read,
keeping the database free of hardcoded library directory. Fix tests to
account for absolute path return values.
2026-04-11 13:01:41 +01:00
Šarūnas Nejus 02be9b277d Handle legacy fields in modify and queries 2026-04-07 10:42:56 +01:00
Šarūnas Nejus b8def07121 autotag: use explicit imports 2026-03-28 12:26:27 +00:00
Šarūnas Nejus 2a003ac709 Refactor ShowChangeTest to use snapshot-style assertions
Replace multiple small tests with two comprehensive snapshot tests
covering the same edge cases and newline and column layouts.

Use BeetsTestCase to ensure that the local dev config is ignored.
2026-03-17 17:59:51 +00:00