The aforementioned commits introduced a nmuber of changes since I
implemented this test:
- The syntax `self.assertExists(m3u_filepath)` was an old and now invalid
way of checking existence of a path using assertion, change to `assert
m3u_filepath.exists()` which now use string instead of bytes
- Use of `Path()` and strings instead of `path.join` and bytes for
handling directory path
Test functions inspired from `test_playlist_update_output_extm3u()` in
`test_smartplaylist.py`.
Test successfully passed using:
`poetry run pytest test/plugins/test_smartplaylist.py`
* official/master: (54 commits)
Require data_source in album_for_id and track_for_id functions
Invoke album_matched hook from AlbumMatch.__post_init__
Refactor match_by_id
Take data source into account when deciding duplicate candidates
Return album candidates from multiple sources when matching by IDs
Add a test to reproduce the issue
Move assignment tests to test/autotag/test_match.py
Pulled latest changelog and added my entry to 'Unreleased > Bug fixes' section.
Moved changelog note to top, under Unreleased.
This PR improves the regex detection used for the drive_sep_replace default.
This PR improves the regex detection used for the drive_sep_replace default.
refactor: Use deprecate_for_user for beatport/bpsync deprecation warnings
Fix docs: use single-line deprecated directive compatible with docstrfmt
Fix docs formatting for beatport and bpsync rst files
Deprecate beatport and bpsync plugins
Update changelog.rst
try to fix fish plugin
Make get_search_query_with_filters abstract
Document new methods
Document shared metadata search plugin workflow
...
These functions now accept both an ID and data_source parameter,
enabling plugins like mbsync and missing to retrieve metadata from the
correct source.
Update mbsync and missing plugins to use the restored functions with
explicit data_source parameters. Add data_source validation to prevent
lookups when the source is not specified.
Add get_metadata_source helper function to retrieve plugins by their
data_source name, cached for performance.
Move MusicBrainzPlugin to SearchApiMetadataSourcePlugin hooks.
Keep entity mapping and criteria in provider-specific hooks.
Update typing and tests for the candidate search path.
Move search orchestration into SearchApiMetadataSourcePlugin.
Migrate Deezer, Spotify, and Discogs to provider hooks.
Keep query handling, logging, and limits centralized.
Add force_ci kwarg to requires_import pytest marker to allow tests
to run unconditionally in CI (GitHub Actions), even if the module
is not detected locally. Refactor autobpm test to use this instead
of manual env-checking at module level.
Add a `requires_import` pytest marker and `is_importable` fixture to
conditionally skip or adjust assertions based on whether optional
dependencies are available. Apply this to `langdetect`-dependent
language detection tests in lyrics and migration test suites.
- Add `LyricsMetadataInFlexFieldsMigration` to extract legacy source
URLs and language metadata from lyrics text into flex attributes
- Add `Lyrics.from_legacy_text` to parse legacy lyrics format
- Move `with_row_factory` context manager up to base `Migration` class
- Rename `migrate_table` to `migrate_model` and pass model class
instead of table name string. This is so that the migration can access
both `_table` and `_flex_table` attributes.
- Make `langdetect` import optional in `Lyrics.__post_init__`: users may
not have have the dependency installed, and we do not want the
migration to fail because of that.
- Move `BACKEND_BY_NAME` to module level for use outside plugin class
* Introduce a `Lyrics` dataclass to carry text, source URL, and language
metadata through fetch, translation, and storage paths.
* Return `Lyrics` from backends and plugin lookup methods instead of raw
tuples/strings.
* Store backend name in `lyrics_source` derived from fetched URL root
domain.
* Simplify translator flow to operate on `Lyrics`, reuse line splitting,
append translations in-place, and record translation language
metadata.