Konstantin
796c9addfb
Fixes TypeError in the Discogs plugin ( #5415 )
...
Handles the case when discogs return `None` for format descriptions.
---------
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-09-19 21:27:16 +01:00
Šarūnas Nejus
5785522170
fetchart: defer file removal config option evaluation ( #5244 )
...
Defer the evaluation of the source file removal options (`import.delete`
and `import.move`) to the point where the fetchart plugin is actually
called instead of only evaluating those configuration options on plugin
initialization.
This is to allow other plugins (such as the
[ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194 )
plugin) to invoke the import directly (within the same python process;
implicitly invoking the fetchart plugin) with temporarily overwritten
configuration options.
Addresses
https://github.com/beetbox/beets/issues/5167#issuecomment-2106465172
2024-09-16 11:44:46 +01:00
Šarūnas Nejus
54b2435c72
Update dependencies and do not install reflink on Windows for tests ( #5407 )
...
See my comment under #5406 for context
> The build on win32 is failing to install reflink because it's [only
supported until Python
3.7](https://gitlab.com/rubdos/pyreflink/-/blob/master/setup.py?ref_type=heads ).
>
> I will address this in a separate PR and rebase this one accordingly
once the fix is merged.
>
> Note: this issue popped up now because I added a new requests-mock
dependency which invalidated cached dependencies.
2024-09-08 12:31:02 +01:00
J0J0 Todos
98f4a88923
ftintitle: New customization option to keep feature in artist field ( #5356 )
2024-09-06 13:41:15 +02:00
Tânio Scherer
0b067e9f5b
Create a new template function: capitalize
...
Update documentation
Update changelog
2024-09-05 23:00:50 -03:00
Karl-Ludwig Besser
39acba5200
Merge branch 'master' into ftintitle_keep_artist
2024-09-05 12:32:20 +02:00
Šarūnas Nejus
851699ab76
Clarify test_unsuccessful_reflink error message
2024-09-05 04:32:13 +01:00
Šarūnas Nejus
fee959c500
Handle missing reflink dependency in the business logic
2024-09-04 20:34:00 +01:00
Šarūnas Nejus
4f3b0faba5
Handle missing reflink dependency in tests
2024-09-04 19:06:55 +01:00
ThinkChaos
65f2285dd3
fix(import): don't throw away album flexible fields
...
As noted by 5bf4e3d92f , MusicBrainz
external IDs (`*_album_id`) were only saved for items and not albums.
This commit addresses that by copying `AlbumInfo` fields to the `Album`,
i.e. what's saved in the DB.
This is similar to how `TrackInfo` fields are copied to `Item` instances
except the copying is done at a different time since we only get an
`Album` much later in the import flow.
2024-08-26 13:06:28 -04:00
Šarūnas Nejus
111686e563
autobpm: add tests
2024-08-19 22:44:17 +01:00
Šarūnas Nejus
4b69b493d2
Use f-string syntax
2024-08-16 17:47:23 +01:00
Šarūnas Nejus
090b62f5b0
Make this test ignore my local beets config
2024-08-12 08:49:30 +01:00
Šarūnas Nejus
d3bdd93bf6
Replace assertAlmostEqual
2024-08-12 08:49:30 +01:00
Šarūnas Nejus
fcc4d8481d
Replace assertListEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
fdb8c28271
Replace assertCountEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
46bdb84b46
Replace assertGreater and assertGreaterEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
6a3380bcb5
Replace assertLess and assertLessEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
eda0ef11d6
Replace assertIsInstance
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
f9359df0d1
Replace assertNotEqual
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
847e3858a6
Replace assertRaises
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
9a05d27acf
Replace assertEqual
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
6631b6aef6
Replace assertNotIn
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
11e948121c
Replace assertIn
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
2616bcc950
Replace assertIsNotNone
2024-08-12 08:43:41 +01:00
Šarūnas Nejus
5d4911e905
Replace assertIsNone
2024-08-12 08:43:41 +01:00
Šarūnas Nejus
cb82917fe0
Replace assertFalse
2024-08-12 08:43:41 +01:00
Šarūnas Nejus
0ecc345143
Replace assertTrue
2024-08-05 17:11:16 +01:00
Šarūnas Nejus
5f395ab4f4
Configure plugins using PluginMixin.configure_plugin
2024-07-29 15:33:12 +01:00
Šarūnas Nejus
199f3079f2
Use PluginMixin in tests that load plugins manually
...
A constant `preload_plugin` is used to disable loading the plugin in the
`setUp` initialisation, allowing the plugin to be loaded manually by the
tests.
Also added a cleanup instruction to remove listeners from configured
plugins, and removed this logic from several tests.
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
9c75513686
test_ui: Fix Config/Plugin/Completion tests interdependency
...
"test" plugin was not properly cleaned up after loading and would
therefore stay around and picked up by other tests.
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
e097f1a8c6
Rewrite FileFilterPluginTest
...
And rewrite the tests since they were far too confusing to follow.
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
6dda984862
Standardize ImportPretendTest import files prep
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
139b54ebd1
Add setup_singleton_importer for singleton importer
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
92f79dbfb9
Fix ConfigTest failures locally
...
A couple of `ConfigTest` would previously fail locally since they
somehow depended on the local environment to work fine. This commmit
decouples them from any environment by setting up patching of the
environment variables properly.
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
8d85cfd72a
Define AsIsImporterMixin to run autotag=False importer
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
f042f5ad32
Leave a single source of truth for importer setup
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
8065ff0461
Split album and singleton tests in edit and filefilter
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
7e444db914
Rename _create_import_dir -> prepare_album_for_import
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
c2fdf9873d
Synchronise ImportHelper._create_import_dir and TestHelper.create_importer implementations
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
41bbb77a0b
Centralise 'import_dir' creation
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
1f8466f04a
Move create_importer to ImportHelper
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
fcff5d72af
Remove def suite TestLoader definitions
2024-07-28 18:58:51 +01:00
Šarūnas Nejus
432da560e4
Create PluginTestCase to dedupe plugin setup
2024-07-28 18:58:35 +01:00
Šarūnas Nejus
16cf8dd937
Centralize db setup on disk
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
7d7f16395c
Remove redundant library setUp instructions
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
2d5fd907c3
Remove redundant setup_beets and teardown_beets instructions
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
b64eaeda0a
Rename LibTestCase to ItemInDBTestCase
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
91099d362e
Deduplicate TerminalImportHelper and rename to TerminalImportMixin
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
6ccf33d79e
test_replaygain: restructure tests to share setup
2024-07-28 18:58:34 +01:00