Skip to content

Commit

Permalink
fix: do not try to map anime with empty string
Browse files Browse the repository at this point in the history
This commit fixes an issue where the mal api gives use a synonym as an
empty string (it should normally return null). If trying to map to the
provider it can happen that the empty string triggers a download of the
whole anime catalouge of the provider, we do not want this!
  • Loading branch information
sdaqo committed Jun 1, 2024
1 parent c4c4f95 commit c39832e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "anipy-api"
version = "3.1.3"
version = "3.1.4"
description = "api for anipy-cli"
authors = ["sdaqo <sdaqo.dev@protonmail.com>"]
license = "GPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion api/src/anipy_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__appname__ = "anipy-api"
__version__ = "3.1.3"
__version__ = "3.1.4"
3 changes: 3 additions & 0 deletions api/src/anipy_api/mal.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,9 @@ def from_myanimelist(

results: Set[ProviderSearchResult] = set()
for title in mal_titles:
if len(title) == 0:
continue

results |= set(self.provider.get_search(title))
if use_filters:
results |= set(self.provider.get_search(title, provider_filters))
Expand Down
4 changes: 2 additions & 2 deletions cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "anipy-cli"
version = "3.1.3"
version = "3.1.4"
description = "Watch and Download anime from the comfort of your Terminal"
authors = ["sdaqo <sdaqo.dev@protonmail.com>"]
license = "GPL-3.0"
Expand All @@ -20,7 +20,7 @@ yaspin = "^3.0.2"
inquirerpy = "^0.3.4"
appdirs = "^1.4.4"
pypresence = "^4.3.0"
anipy-api = "^3.1.3"
anipy-api = "^3.1.4"

[tool.poetry.scripts]
anipy-cli = "anipy_cli.cli:run_cli"
Expand Down
2 changes: 1 addition & 1 deletion cli/src/anipy_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__appname__ = "anipy-cli"
__version__ = "3.1.3"
__version__ = "3.1.4"

0 comments on commit c39832e

Please sign in to comment.