mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix(music): 卷号后缀剥离下沉到候选比对修复系列专辑失配
- 检索侧已剥离的 Vol. N 卷号后缀在候选挑选侧同样剥离, 「好歌茹芸, Vol. 3」本体名与条目「好歌, 茹芸」主标题弱匹配命中 - 检索词元切分补充 ASCII 逗号/分号,避免标点成为逐字检索词元 - 补充卷号弱匹配测试案例
This commit is contained in:
@@ -679,6 +679,24 @@ def test_select_album_candidate_matches_performance_suffix():
|
||||
assert matched.media_id == "album-1"
|
||||
|
||||
|
||||
def test_select_album_candidate_strips_volume_suffix():
|
||||
"""系列专辑卷号后缀(Vol. 3)是发行分卷标记,本体名一致应弱匹配命中。"""
|
||||
meta = MetaMusic(title="好歌茹芸, Vol. 3", artists=["许茹芸"], year=2011)
|
||||
album = MusicInfo(
|
||||
source="musicbrainz",
|
||||
music_type="album",
|
||||
media_id="album-1",
|
||||
title="好歌, 茹芸: Valen Hsu Greatest Hits",
|
||||
artists=["許茹芸"],
|
||||
year=2011,
|
||||
)
|
||||
|
||||
matched = MusicBrainzModule._select_album_candidate(meta, [album])
|
||||
|
||||
assert matched is not None
|
||||
assert matched.media_id == "album-1"
|
||||
|
||||
|
||||
def test_select_album_candidate_matches_contained_title():
|
||||
"""条目带额外前缀完整包含资源主体名(原声带类)时应弱匹配命中。"""
|
||||
meta = MetaMusic(
|
||||
|
||||
Reference in New Issue
Block a user