Skip to content

Commit 00f097f

Browse files
committed
matching: replace search_title, search_album with search_name
1 parent 23b4203 commit 00f097f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

beets/autotag/match.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _add_candidate(
241241
def tag_album(
242242
items,
243243
search_artist: str | None = None,
244-
search_album: str | None = None,
244+
search_name: str | None = None,
245245
search_ids: list[str] = [],
246246
) -> tuple[str, str, Proposal]:
247247
"""Return a tuple of the current artist name, the current album
@@ -302,10 +302,10 @@ def tag_album(
302302
)
303303

304304
# Search terms.
305-
if not (search_artist and search_album):
305+
if not (search_artist and search_name):
306306
# No explicit search terms -- use current metadata.
307-
search_artist, search_album = cur_artist, cur_album
308-
log.debug("Search terms: {} - {}", search_artist, search_album)
307+
search_artist, search_name = cur_artist, cur_album
308+
log.debug("Search terms: {} - {}", search_artist, search_name)
309309

310310
# Is this album likely to be a "various artist" release?
311311
va_likely = (
@@ -317,7 +317,7 @@ def tag_album(
317317

318318
# Get the results from the data sources.
319319
for matched_candidate in metadata_plugins.candidates(
320-
items, search_artist, search_album, va_likely
320+
items, search_artist, search_name, va_likely
321321
):
322322
_add_candidate(items, candidates, matched_candidate)
323323
if opt_candidate := candidates.get(matched_candidate.album_id):
@@ -333,7 +333,7 @@ def tag_album(
333333
def tag_item(
334334
item,
335335
search_artist: str | None = None,
336-
search_title: str | None = None,
336+
search_name: str | None = None,
337337
search_ids: list[str] | None = None,
338338
) -> Proposal:
339339
"""Find metadata for a single track. Return a `Proposal` consisting
@@ -375,12 +375,12 @@ def tag_item(
375375

376376
# Search terms.
377377
search_artist = search_artist or item.artist
378-
search_title = search_title or item.title
379-
log.debug("Item search terms: {} - {}", search_artist, search_title)
378+
search_name = search_name or item.title
379+
log.debug("Item search terms: {} - {}", search_artist, search_name)
380380

381381
# Get and evaluate candidate metadata.
382382
for track_info in metadata_plugins.item_candidates(
383-
item, search_artist, search_title
383+
item, search_artist, search_name
384384
):
385385
dist = track_distance(item, track_info, incl_artist=True)
386386
candidates[track_info.track_id] = hooks.TrackMatch(dist, track_info)

0 commit comments

Comments
 (0)