Skip to content

Commit

Permalink
Reapply "Merge pull request #1 from whatphilipcodes/fx-autotagger-query"
Browse files Browse the repository at this point in the history
This reverts commit e9f7fd3.
  • Loading branch information
whatphilipcodes committed Oct 1, 2024
1 parent 8a210f7 commit fc9fb0a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion beetsplug/bandcamp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,21 @@ def candidates(
if "various" in artist.lower():
artist = ""

search = {"query": album, "artist": artist, "label": label, "search_type": "a"}
if album == "":
search = {
"query": item.title,
"artist": artist,
"label": label,
"search_type": "t",
}
else:
search = {
"query": album,
"artist": artist,
"label": label,
"search_type": "a",
}

results = map(itemgetter("url"), self._search(search))
yield from chain.from_iterable(filter(None, map(self.get_album_info, results)))

Expand Down

0 comments on commit fc9fb0a

Please sign in to comment.