Skip to content

Commit

Permalink
fix None being a possible candidate if asked for nonexisting id
Browse files Browse the repository at this point in the history
  • Loading branch information
HOZHENWAI committed Mar 6, 2023
1 parent 2c6faaa commit 140d030
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion beetsplug/VGMplug.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def _search_vgmdbinfo(self, query: str):
)
for album in items["results"]["albums"]:
album_id = album["link"].split("/")[1]
albums.append(self.album_for_id(album_id))
candidate_album = self.album_for_id(album_id)
if candidate_album is not None:
albums.append(candidate_album)
if len(albums) >= 5:
self._log.debug("Too many result on VGMDB, breaking")
break
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "beets-vgmdb"
version = "1.2.5"
version = "1.2.6"
authors = [{name="HO ZhenWai Olivier", email="[email protected]"}]
description = "Beets VGMdb metadata plugin and collection manager."
readme = "README.md"
Expand Down

0 comments on commit 140d030

Please sign in to comment.