Commit graph

256 commits

Author SHA1 Message Date
Sebastian Mohr
8de2a142ce Fixed issue with mpdstats test and removed unregister_all function
as it introduces issues.
2025-09-17 20:55:02 +02:00
Sebastian Mohr
21d07b41ff Renamed PluginTestCase to PluginUnitTestCase 2025-09-17 19:18:48 +02:00
Šarūnas Nejus
3bc653b989
lyrics: xfail sweetslyrics end-to-end test 2025-08-30 23:10:22 +01:00
Šarūnas Nejus
44fda7ca0a
lyrics: use another beatles song for Lyricsmode
Lady Madonna apparently is gone from this website. ¯\_(ツ)_/¯
2025-08-30 23:10:22 +01:00
Šarūnas Nejus
d93ddf8dd4
Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
2fccf64efe
Do not use backslashes to deal with long strings 2025-08-30 23:10:20 +01:00
Šarūnas Nejus
1c16b2b308
Replace string concatenation (' + ')
- Join hardcoded strings
- Replace concatenated variables with f-strings
2025-08-30 23:10:15 +01:00
Šarūnas Nejus
9352a79e41
Replace percent formatting 2025-08-30 22:35:00 +01:00
Šarūnas Nejus
4a361bd501
Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
Sebastian Mohr
abffa7900b Fixed tests as query formatting changed slightly. 2025-08-26 13:41:11 +02:00
J0J0 Todos
f85ba7ab3b lastgenre: Fix test_get_genre loading whitelist
- The default whitelist files were not loaded properly (at least in
  local test environments, not sure about CI yet...anyway...)
2025-08-24 09:20:36 +02:00
J0J0 Todos
7f7b900f1b lastgenre: Test canonicalization
- Test non-whitelisted genres resolving "up" in the tree.
- Test whitelisted original and whitelisted new genre resolving "up"
- Test non-whitelisted original genre resolving "up" (and deduplication
  works)
2025-08-24 09:20:36 +02:00
Šarūnas Nejus
2059a3a802
Move EventType definition to plugins.py and fix test_hook types 2025-08-09 15:44:35 +01:00
Šarūnas Nejus
3be4a89aee
refactor: convert _types from class attributes to cached properties
Convert static _types dictionaries to dynamic cached class properties to
enable proper plugin type inheritance and avoid mutating shared state.

Key changes:
- Replace static _types dicts with @cached_classproperty decorators
- Update cached_classproperty to support proper caching with class names
- Remove manual _types mutation in plugin loading/unloading
- Add pluginload event and cache clearing for proper plugin integration
- Fix test to trigger type checking during item creation

This ensures plugin types are properly inherited through the class
hierarchy and eliminates issues with shared mutable state between
test runs.
2025-07-16 14:45:25 +01:00
Šarūnas Nejus
e1162b7e0f
Rename test_player -> test_bpd 2025-07-16 14:06:35 +01:00
Šarūnas Nejus
a5bbe57490
Fix types in test_player 2025-07-16 14:06:34 +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
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
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
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
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
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
605cea9bdc
Rip away io stuff from TestHelper to IOMixin 2025-07-09 09:17:13 +01:00
Šarūnas Nejus
7cada1c9f8
Remove no-op decargs 2025-07-08 11:37:33 +01:00
dhruvravii
dd6cb538ac
Fix: Spotify plugin unable to recognize Chinese and Japanese albums. (#5705)
Fixes an issue where each spotify query was converted to ascii before sending. Adds a 
new config option to enable legacy behaviour.

A file called japanese_track_request.json was made to mimic the Spotify
API response since I don't have the credentials. Entries in that will
need to be modified with the actual entries.

Co-authored-by: Sebastian Mohr <sebastian@mohrenclan.de>
Co-authored-by: Sebastian Mohr <39738318+semohr@users.noreply.github.com>
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2025-07-01 11:08:54 +02:00
Nicolas Mémeint
4893cee5e5 Fix the MusicBrainz search not taking into account the album/recording aliases 2025-06-15 21:33:20 +01:00
Ben Stolovitz
2f98f11d57 fix local langdetect test failures
avoid linter error

avoid other linter error

fix format

changing deps (no lock!)

poetry lock?

lint & format

attempt 2 at poetry lock

crlf -> lf line endings

changelog!
2025-05-31 18:56:21 -04:00
Šarūnas Nejus
cb246c28bc
Remove dead chartlyrics
This integration test failed because `chartlyrics.com` website is no
longer available, so I'm removing it.
2025-05-31 19:17:43 +01:00
Uncorrupt3318
dd2f203090
Feat: Add replace plugin (#5644)
Adds replace plugin. The plugin allows the user to replace the audio
file of a song, while keeping the tags and file name.

Some music servers keep track of favourite songs via paths and tags. Now
there won't be a need to 'refavourite'. Plus, this skips the
import/merge steps.
2025-05-27 00:17:52 +02:00
Šarūnas Nejus
5900282093
Use BeetsTestCase for lastgenre tests, re-use the defined config 2025-05-26 13:05:40 +01:00
Šarūnas Nejus
c9f98fca55
Use unittest.TestCase for tests that don't require the dir setup 2025-05-26 12:40:38 +01:00
wisp3rwind
abbabcf92e tests: skip tests that require ArtResizer.compare if it is broken
This is just a quick workaround to allow CI to pass. This didn't show up
in CI before because we didn't install ImageMagick.
2025-05-20 09:00:04 +02:00
wisp3rwind
a6f2389aed typing: fetchart + tests 2025-05-20 08:57:30 +02:00
Šarūnas Nejus
9cc7ecaceb
discogs: cache TRACK_INDEX_RE 2025-05-19 09:43:03 +01:00
Šarūnas Nejus
2ec65ed8ca
Deduplicate candidate methods using _search_api method 2025-05-18 20:09:52 +01:00
Šarūnas Nejus
0102f3ce7d
Take into account va_likely param and remove redundant checks
- Instead of checking for empty `artist` query, use `va_likely`
  parameter to determine whether we should query for Various Artists or
  not.
- `album` / `title` is always a truthy string - no need to handle empty
  criteria case
- `tracks` list always has at least one track - no need to check for
  `len(items)`
2025-05-18 20:09:52 +01:00
Šarūnas Nejus
6487893315
Synchronise docs with the actual supported extra_tags 2025-05-18 20:09:51 +01:00
Šarūnas Nejus
be74936134
Handle extra_tags the way they used to be handled 2025-05-18 20:09:50 +01:00
Šarūnas Nejus
b520981c9c
plugins: restructure id extraction 2025-05-17 14:57:34 +01:00
Sebastian Mohr
a2e316d444 Merge remote-tracking branch 'upstream/master' into importer-restructure 2025-05-17 10:32:50 +02:00
Šarūnas Nejus
33bed79a13
Move scrub test to a separate file 2025-05-17 03:32:00 +01:00
Šarūnas Nejus
bef0bcbaa6
musicbrainz: synchronise plugin import path 2025-05-17 03:31:58 +01:00