Commit graph

12988 commits

Author SHA1 Message Date
Sebastian Mohr
5fe8431a65 Use inspect instead of isclass in load_plugin function to fix import
issues.
2025-07-15 15:03:14 +02:00
Sebastian Mohr
24295d6844 Renamed plugin, adjusted some docstrings and moved
artists_to_artist_str back into get_artist method.
2025-07-15 15:03:14 +02:00
Sebastian Mohr
06b6f4f27b Isolated autottag related plugin functions into an new metadata_plugins
file.
2025-07-15 15:03:14 +02:00
Martin Atukunda
8126eaa0fa
Merge branch 'master' into feature/add-artist-to-item-entry-template 2025-07-15 13:58:25 +03:00
Martin Atukunda
d476af8ecd
Move change log note to the New features
After some guidance from @snejus this is the proper place to place the
change log entries, not inside the New features section of _released_
versions.
2025-07-15 13:55:49 +03:00
Šarūnas Nejus
24dd40eed2
feat: mpdstats: adds config option for remaining time threshold to determine if track was played. (#5657)
Add new configuration option for mpdstats plugin,
`played_ratio_threshold`, to allow configuring the percentage the song
must be played for it to be counted as played instead of skipped.
2025-07-10 10:32:43 +01:00
54562474
48d45b4df7 feat: mpdstats: add config option for played ratio threshold to determine if a
track was played or skipped.
2025-07-09 14:16:23 -06:00
Šarūnas Nejus
8a43133bbe
Replace custom unittest-like methods with assertions (#5854)
## Replace custom assertion methods with standard assertions

This PR is part of `unittest` -> `pytest` migration #5361 and removes
custom assertion methods from the test suite and replaces them with
standard Python assertions.

### Key Changes

- Removed custom assertion methods
- Updated path handling to use `pathlib.Path` wherever this was relevant
to the methods being replaced
- Simplified some of the tests structure
2025-07-09 13:24:50 +01:00
Šarūnas Nejus
0dd6cb3b6d
Replace assert_equal_path 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
ca3adfe525
Replace assertPrem 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
8dcc69e6d8
Replace _assert_image_operated 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
9f6d5063d1
Replace _assertImageIsValidArt 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
72caf0d2cd
Replace assertCount 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
111cb562ea
Replace assertContains and assertExcludes 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
3c8179a762
Replace assertAlbumImport 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
c6b5b3bed3
Replace assertFileTag and assertNoFileTag 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
43b8cce063
Replace assertIsDir 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
ca4fa6ba10
Replace assertIsFile 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
038843cdb2
Replace assertAlmostEqual and assertEqualTimes 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
Šarūnas Nejus
e6d5f73964
Use pathlib.Path in test_convert 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
31dbd51222
Replace assertExists and assertNotExist 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
c706f62fb2
Replace assertExists in test_files 2025-07-09 09:21:48 +01:00
Šarūnas Nejus
e40c7fd71c
Introduce Album.art_filepath to simplify existence checks 2025-07-09 09:21:47 +01:00
Šarūnas Nejus
d017270196
Use pathlib.Path in test_smartplaylist.py 2025-07-09 09:17:14 +01:00
Šarūnas Nejus
edd3df99ba
Introduce TestHelper.temp_dir_path 2025-07-09 09:17:14 +01:00
Šarūnas Nejus
9e4b117454
Speed up tests that only need IOMixin 2025-07-09 09:17:13 +01:00
Šarūnas Nejus
605cea9bdc
Rip away io stuff from TestHelper to IOMixin 2025-07-09 09:17:13 +01:00
Šarūnas Nejus
a815305fcd
Remove decargs and other references to Python 2 (#5859)
This PR modernizes the codebase by removing Python 2 compatibility code
and simplifying several areas:

- Deleted `BytesQuery` class (replaced with `PathQuery`)
- Removed `decargs()` function that was a no-op in Python 3
- Simplified `print_()` function signature and implementation
- Removed coding-related workarounds in various modules
2025-07-09 02:56:31 +01:00
Šarūnas Nejus
afe97cf31e
Do not assign args to query 2025-07-08 11:37:34 +01:00
Šarūnas Nejus
4260162d44
Remove all Python 2 references 2025-07-08 11:37:34 +01:00
Šarūnas Nejus
7cada1c9f8
Remove no-op decargs 2025-07-08 11:37:33 +01:00
Sebastian Mohr
e6016c125b Added changelog entry. 2025-07-08 11:38:12 +02:00
Sebastian Mohr
9cd1a50785 Added git blame ignore 2025-07-08 11:38:12 +02:00
Sebastian Mohr
98377ab5f6 Split library file into different files inside library folder. 2025-07-08 11:38:12 +02:00
Šarūnas Nejus
3d364e4666
Only consider release collections in mbcollection plugin (#5856)
Currently, `mbcollection` takes the first collection it finds (if the
user does not explicitely indicates one in the configuration).

The problem is that the user may have collections of types that we are
not interested in (e.g. recording collections, artist collections,
etc.).

Since the `get_collections` response returns the collections types, we
can only keep the `release` collections.
2025-07-07 16:31:05 +01:00
Nicolas Mémeint
eb497eee1a Only consider release collections in mbcollection plugin 2025-07-07 13:25:25 +02:00
Šarūnas Nejus
f461651797
Minor improvements to deezer plugin typing. (#5814)
Added some more typehints to deezer plugin.

I know, it is properly not used much and we don't even have test for the
deezer plugin but I want to make this a bit more maintainable, mainly to
prepare for https://github.com/beetbox/beets/pull/5787 and make
migration a bit easier.
2025-07-07 12:14:20 +01:00
Sebastian Mohr
50604b0510 Fixed linting issue after rebase. 2025-07-07 11:40:51 +02:00
Sebastian Mohr
04a3dd2169 Adjusted typehint for search api. Removed optional none from filter. 2025-07-07 11:37:02 +02:00
Sebastian Mohr
1f15598294 Moved constants back to top. 2025-07-07 11:37:02 +02:00
Sebastian Mohr
6ab0f8d3a7 Removed old docstring. 2025-07-07 11:37:02 +02:00
Sebastian Mohr
085b89b70b Minor improvements to deezer plugin typing. 2025-07-07 11:37:02 +02:00
Sebastian Mohr
59ecfd9a49 Moved fetch_data and _get_track function. 2025-07-07 11:36:38 +02:00
Martin Atukunda
a64acf8aa2
Merge branch 'master' into feature/add-artist-to-item-entry-template 2025-07-07 09:35:15 +03:00
J0J0 Todos
a01e603492
Support m3u8 ending in playlist plugin (#5829)
m3u8 files are technically supported in the playlist plugin, only the
difference in the file ending prevented usage of such files.
2025-07-07 08:13:16 +02:00
J0J0 Todos
cf557fb41b playlist: Use pathlib.Path and add types for is_m3u_file()
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-07-07 08:05:47 +02:00
J0J0 Todos
257991c73d playlist: Changelog for #5829 2025-07-07 08:05:45 +02:00
J0J0 Todos
dcd3a9f7f4 playlist: Support m3u8 ending in playlist plugin 2025-07-07 07:58:59 +02:00