mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-26 05:42:04 +08:00
fix(music): keep shared search signatures compatible
This commit is contained in:
@@ -219,6 +219,18 @@ def test_theaudiodb_module_ignores_other_sources(monkeypatch):
|
||||
request.assert_not_called()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("module_class", [DoubanModule, TheAudioDbModule])
|
||||
def test_music_search_modules_accept_entity_filter_from_shared_dispatch(module_class):
|
||||
"""共享模块调度器广播实体过滤参数时,各内置音乐来源都必须保持签名兼容。"""
|
||||
module = module_class()
|
||||
|
||||
assert module.search_music(
|
||||
MetaMusic(title="Yellow"),
|
||||
media_source=MediaSource.MusicBrainz,
|
||||
music_types=("recording", "album"),
|
||||
) is None
|
||||
|
||||
|
||||
def test_theaudiodb_title_only_search_skips_incomplete_track_and_album_requests(monkeypatch):
|
||||
"""缺少艺术家时只搜索艺术家,避免请求会返回空正文的曲目和专辑接口。"""
|
||||
module = TheAudioDbModule()
|
||||
|
||||
Reference in New Issue
Block a user